djangosnippets.org: Latest snippets tagged with 'locmem'https://djangosnippets.org/tags/locmem/2011-03-18T02:52:10.319667-05:00Non-pickling locmem (in-process memory) cache backend
2011-03-18T02:52:10.319667-05:00akaiholahttps://djangosnippets.org/snippets/2396/<p>You can use this cache backend to cache data in-process and avoid the overhead of pickling. Make absolutely sure you don't modify any data you've stored to or retrieved from the cache. Make deep copies instead if necessary.</p>
<p>The backend is basically identical to Django's stock locmem cache (as of …</p>
Freely redistributableReset cache between tests
2009-11-11T11:05:57.696074-06:00peterbehttps://djangosnippets.org/snippets/1789/<p>I don't understand why the cache is accumulated between the tests. I thought one of the axioms of unit testing is that the tests should not affect each other. </p>
<p>Couldn't find anything that explains why it's done this way but it seems a bit strange. Anybody know if there's a …</p>
Freely redistributable