In the docu there ware two syntax for a "per-view cache": """ def my_cool_view(request): # cool processing slashdot_this = cache_page(slashdot_this, 60 * 15) """ or """ @cache_page(60 * 15) def my_cool_view(request): # cool processing """ see: http://www.djangoproject.com/documentation/cache/#the-per-view-cache
Both syntax version doesn't work yet, because of this Bug: http://code.djangoproject.com/ticket/1015 The Bug is opened 2 years ago. Two years! And this ticket has a work-a- round that works: """ @cache_page def my_cool_view(request): # cool processing """ I fall into this bug trap, because i have used the code from the documentation. If you search the maillinglist, you can see, that other users are falled into the same trap. I have made a ticket, that the docu should be changed (insert a comment and/or insert the work-a-round): http://code.djangoproject.com/ticket/4649 This ticket is closed ("invalid")... I think that is not the best way, to handle those things. -- Mfg. Jens Diemer ---- A django powered CMS: http://www.pylucid.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---