Thanks for the feedback guys - good to know that I'm not alone in
seeing this behaviour.

It seems odd that this doesn't seem to have popped up as a common
issue, if it is indeed something related to site-wide caching - it's
definitely a bit of a show-stopper when it comes to having a client
using an admin interface which doesn't function in a rationale way (to
thier eyes at least).

Your idea, Axel, of caching individual views has two stumbling blocks for me:

1) Am I right in thinking that decorators were only introduced in Python 2.4?
2) This would mean overriding the admin views for every application
I'm running, and makes me groan at the thought of keeping things
up-to-date.

Rock: blowing away the cache files, although would work, doesn't sound
like a very graceful way to deal with this problem.

I'd be interested to know the thoughts of any of the core developers on this?

-Phil

On 20/07/06, Axel Steiner <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > It looks like the right way to deal with this is to implement per page
> > caching, but that doesn't look too simple to me. I hope that someone
> > will prove me wrong by posting some simple instructions for implemeting
> > per page caching. Alternatively please post a mechanism for disabling
> > global caching for selected pages (even though I doubt that that is
> > possible without creating some custom middleware.)
>
> caching individual views is also simple. When your cache is already setup,
> just add a decorator for each view, which should be cached.
>
> from django.views.decorators.cache import cache_page
>
> @cache_page(900)
> def myview(request):
>    ...
>
> The argument for cache_page is the cache timeout in seconds.
>
> Bye,
> Axel
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to