On Sat, Nov 27, 2010 at 4:30 AM, ydjango wrote:
> I have added following to cache some common DB data and it seems it
> has started caching whole pages by default. Some pages appeared to be
> retrieved from cache without even hitting the view.
>
> and in my views,
>
> from django.core.cache im
yes, I mistakenly thought I need middleware to cache db objects. I guess
following is enough for my needs,
CACHE_BACKEND = 'locmem://'
from django.core.cache import cache
and cache.set('add_key', 'Initial value')
>>> cache.add('add_key', 'New value')
>>> cache.get('add_key')
thanks
On Fri, Nov
On Nov 26, 2010, at 8:30 PM, ydjango wrote:
> I have added following to cache some common DB data and it seems it
> has started caching whole pages by default. Some pages appeared to be
> retrieved from cache without even hitting the view.
Unless I'm missing something, that's exactly what it is
3 matches
Mail list logo