Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera113888yGood cdn has a way to clear the cache or trigger reload of some content.
We use a technique called fingerprinting where all js and css gets prefixed with a unique fingerprint in the path.
This is handled by a module in the server and depends on a checksum of the file.
As long as the file is unchanged it can be cached indefinitely but once it changes all pages will be on the fly rewritten with the new version causing an immediate reload bypassing the cache.
As a bonus it refreshes even client side caching. -
Yup! CDNs require a good way to bust cache. I use version tags but I like the file checksum idea too!
-
avedis31678y@Voxera which cdb is this?... my vps is on media temple who have partnered up with SiteLock's TrueCDN.
They dont have a dashboard, just a button clear cache and deactivate / activate. -
Voxera113888y@avedis we do not use CDN as such but the fingerprinting is a module for iis that a colleague wrote.
Together with the rewrite module to update urls in all pages after rendering is complete before sending to client. -
avedis31678y@Voxera ohhh okay... my issue for using CDN had nothing to do with caching. caching is easy to handle for me. i add specific provisions for Nginx, and my framework does exactly what your colleague has developed if i want to.
All resources will be appended with an asset updated timestamp as such:
css/theme.css?1493907934
When cdn caches erroneous scripts... good luck solving it "asap"
undefined