djangosnippets.org: Latest snippets tagged with 'cacheing'https://djangosnippets.org/tags/cacheing/2008-08-18T09:41:11.302862-05:00Cacheable resources
2008-08-18T09:41:11.302862-05:00jbrisbinhttps://djangosnippets.org/snippets/991/<p>This snippet provides a template tag that automatically replaces references to any resource you want
cached forever with a version of the file that is based on the MD5 sum. For an image, you would use
something like:</p>
<pre><code>{% load utils %}
<img src="{% cacheable "/media/images/logo.png" %}"/>
</code></pre>
<p>To install it, …</p>
Freely redistributable