Hi all,
I'm a bit confused about the caching. I've started using per-view
caching with the @cache_page decorator.
Now, if I add this to pages that return private content to logged-in
users, will it do the right thing and not show information for one
logged-in user to another? And it must not show logged-in content to
non-logged in users of course.
Example:
@cache_page(3 * 60)
@login_required
def view(request):
if request.user.is_authenticated():
# show something that is "private" to this user...
else:
# show general stuff, for all non-logged in users
Also, does anyone know of a simple way to tell when stuff is served
from cache and not, when you're testing on your production server?
Thanks in advance!
Håkan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---