On Tue, May 10, 2011 at 12:17 PM, galgal <[email protected]> wrote:
> I need to use memcached and file based cache.
> Docs says:
> cache.set('my_key', 'hello, world!', 30)
> cache.get('my_key')
> OK, but how can I now set and get cache only for 'inmem' cache backend (in
> future memcached)? Documentation doesn't mention how to do that.
>
from django.core.cache import get_cache, cache
inmem_cache = get_cache('inmem')
default_cache = get_cache('default')
# default_cache == cache
Cheers
Tom
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.