Git Product home page Git Product logo

Comments (3)

buunguyen avatar buunguyen commented on July 17, 2024

Thanks for reporting the issue and the detailed write up. I will certainly be pleased to merge when we have worked out a good solution. I have two questions regarding the proposed fix:

  1. It addresses client-side caching, but not serve-side caching? Shouldn't the same guard be placed in this line to prevent Combres to cache the response?
  2. On the other hand, isn't a 404 response a better option than disabling caching and returning the wrong content? How does that impact your deployment workflow?

Let me know what you think.

from combres.

svickers avatar svickers commented on July 17, 2024
  1. Hmm, not sure. In our case we want it to cache because the initial combining takes a couple seconds and don't want the servers to be constantly churning on that. We will have multiple copies in the cache but the files will always be correct. If you are using a distributed cache I think this would cause a problem though, perhaps a switch in the config somewhere?
  2. I would rather have the wrong styles than no styles, but maybe there is a case where that is preferred? Another configuration setting?

from combres.

buunguyen avatar buunguyen commented on July 17, 2024
  1. Distributed cache or not, wouldn't not guarding server cache mean the server will cache the response under the new path? That means even after you deploy the new files to the server in question, they won't be used until the cache expires, the same problem you tried to avoid, no? So I'm in the opinion that if a server hasn't been updated with new files, it shouldn't try to cache new path at all, both client & server.
  2. I was thinking of scripts as well. If the HTML/DOM has been changed, using an old script might cause expected behavior. At least a 404 indicates that the server isn't ready with new code yet and nobody's surprised about some unexpected behavior (and filing a bug report).

from combres.

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.