djangosnippets.org: Latest snippets tagged with 'threads'https://djangosnippets.org/tags/threads/2007-04-25T16:31:18.809648-05:00Cache any function (with its arguments)
2007-04-25T16:31:18.809648-05:00bkroezehttps://djangosnippets.org/snippets/202/<p>Please see original snippet for commentary, all I did was add the caching of the arguments.</p>
<p>http://www.djangosnippets.org/snippets/109/</p>
Freely redistributableCache Any Function
2007-03-14T23:52:29.556905-05:00jeffwheelerhttps://djangosnippets.org/snippets/109/<p>A decorator similar to <code>cache_page</code>, which will cache any function for any amount of time using the Django cache API.</p>
<p>I use this to cache API calls to remote services like Flickr in my view, to prevent having to hit their servers on every request.</p>
<p>I posted a sample …</p>
Freely redistributable