Simple django cachebusting middleware
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
django_cachebust
LICENSE.txt
README.rst

README.rst

django_cachebust

A simple Django app to handle cache busting for locally served static assets. This app makes it possible to deliver non-expiring assets for performance in compliance with best practices such as https://developers.google.com/speed/docs/best-practices/caching

To use this, an apache configuration like this should work:

<VirtualHost *:80>
    ServerName static.mydomain.com
    ServerAlias static

    ExpiresActive On
    ExpiresDefault "access plus 1 year"
    RewriteEngine On
    RewriteRule (.*)-cb\d+\.(.*)$ $1.$2 [L]

    DocumentRoot /var/www/html
</VirtualHost>
Other Resources: