Right now the built-in caching mechanism has support for memcache. It'd be nice
to implement 4 levels of caching, for views and for regular functions:
1. Google Edge cache (e.g. 'Cache-Control': 'public,max-age=60') [Views Only]
2. In Memory
3. Memcache
4. Datastore
Use case would be to decorate functions with a cache function and specify a
cache level:
e.g
EDGE_CACHE = 0x1
LOCAL_CACHE = 0x2
MEM_CACHE = 0x4
DATASTORE_CACHE = 0x8
@cache(key, expiration, level=EDGE_CACHE|DATASTORE_CACHE)
def page_view(request):
....
Consideration for multi-threading would have to be taken into account for the
local_memory cache as well as expiration times.
Django has this built-in feature:
https://code.djangoproject.com/svn/django/trunk/django/core/cache/backends/locme
m.py
Original issue reported on code.google.com by someone1@gmail.com on 13 Mar 2012 at 6:36
Original issue reported on code.google.com by
someone1@gmail.com
on 13 Mar 2012 at 6:36