Giter Site home page Giter Site logo

Comments (2)

BobbyWibowo avatar BobbyWibowo commented on July 26, 2024

Seems like I had completely wrong knowledge of this whole Cache-Control thing (if not all, then most).
I've just read some articles and I think I've finally figured out the proper way to achieve what I want.
I'll make a commit in a few hours after some more learning and testing, I think.

from lolisafe.

BobbyWibowo avatar BobbyWibowo commented on July 26, 2024

Ok, b431d11 does it.
Basically, now proxy server will cache those HTML frontends for 30 days, but clients/browsers will not.
From what I can tell, clients will still cache them, but clients will use ETag to check whether the file in the proxy server has changed, and if not, skip download.
And, since all that needs to be done is just to connect to proxy server, as in, not having to wait for proxy server to fetch from origin server, First Time Byte (FTB) is great worldwide.
Then when it comes to having to update, the new yarn cfpurge script is all that needs to be run to purge cache of those HTML frontends in proxy server.
I even made a shortcut script named yarn pm2restart to restart PM2 of the safe then run the purge script (so my workflow is pretty much only yarn pull; yarn pm2restart, huh).

from lolisafe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.