11

Cache, why is it always the cache ;_;

Comments
  • 3
    HTTP 304: Not Modified
  • 7
    *disables cache* why is everything so damn slow?

    One day i will win this war.
  • 2
    @C0D4 Use dynamic packaging of css/js. It will keep cache if you don’t edit any of files. It will generate a new link if you change one of underlying files.
    PROS :
    Once in place you can forget about any cache problem
    CONS :
    Your webapp will be slower to startup (cold-boot). After that it’s faster than before.
    If there is an error, some packagers will scream death and refuse to output any css/js
  • 1
    @NoToJavaScript the issue is when it caches the old html page it was included in and a few refreshes dont work.
  • 3
    @NoToJavaScript yes, where I can control the cache, I implement e-tag and dynamic links based on modified times for resources that are likely to change (custom css, js) while leaving packages alone. This works well.

    However when you don't control the cache... looking at you Salesforce... this isn't always possible.
  • 2
    @Codex404 Ah. HTML ;p
    I don’t have a good option. For our pages directly loaded, it seams to never be a problem (I should check if I din’t disabled the cache like 4 years ago)
    For dynamic HTML, we manually append ?v=timestamp lol. (Well, not manually/manually, but you see what I mean)
  • 2
    @C0D4

    I just checked....

    I’m laughing soso much.
    The ONLY thing what is cached is… The dynamic packaging on js/css
    All CDN libs (jquery and co) : No cache
    All pages : no cache
    OMG, nobody saw it in 3-4 years.
    Well, I know what I’m fixing tomorrow
  • 3
    @NoToJavaScript that's usually the way you stumble on these things
  • 2
    @C0D4 Well, to be fair,, load times are still under 0.5 sec, so may be that's why no one cares
  • 3
    There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
Add Comment