On Dec 24, 2009, at 10:28 PM, brook wrote:

>
>
> On Dec 23, 5:13 am, Eric Abrahamsen <gir...@gmail.com> wrote:
>>
>> I'm using memcached with the cache_page decorator, and it simply  
>> wasn't caching
>> views.
>
>> CACHE_MIDDLEWARE_KEY_PREFIX = 'blah'
>> CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
>> CACHE_BACKEND = 'memcached://XX.XX.XX.XXX:6905/'
>>
>> I have no cache-related middlewares installed.
>>
>
> If you are using the "per-view" caching technique (using the
> cache_page decorator), and you haven't got caching middleware enabled,
> then CACHE_MIDDLEWARE_PREFIX and CACHE_MIDDLEWARE_ANONYMOUS_ONLY won't
> do anything. These are related to "per-site" caching, as detailed in
> the documentation: 
> http://docs.djangoproject.com/en/1.1/topics/cache/#the-per-site-cache
>
> You might consider using database caching[1] in your development
> environment, to make inspecting the cache easier. You can then look at
> the caching table in your database to check whether it is being
> populated as expected. That way you can start to narrow down where the
> problem lies (django's caching, or memcached).

Thanks for the tip! The database is being populated as expected by the  
cache framework, so the problem must lie with memcached somehow.

Could there be some permissions issues going on here? Some conflict  
between the apache user and my user, which started memcached?

Any hints appreciated, in the meantime I'll continue poking.

E


>
> [1] http://docs.djangoproject.com/en/1.1/topics/cache/#database- 
> caching
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com 
> .
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to