I’m using Google App Engine to cache my static files for a while now. So far, I’m quite happy with my blog performance and using Google App Engine as a CDN definitely improves my blog page speed. I even upgraded to add more bandwidth, since I exceeded the bandwidth limit quite often.
After using it for some time, I had an issue with the cache. Google App Engine caches my static files to all the edge servers. So when I’m doing an update (in a CSS file for example), it still shows the old file instead of the new updated file. It is still cached.
So how to work around this issue, so you can access the new updated file instead of the old file? You can add a version query string at the end of your file URL.
For example:
URL without query string: http://cdn.ivankristianto.com/styles/min.css
URL with query string: http://cdn.ivankristianto.com/styles/min.css?v=1.0
So when I update my CSS file, I just need to increment the version, and I’ll get the new updated CSS file. It is a small trick to revalidate your cache files in Google App Engine, but it helps a lot when fixing my design.
