On Friday 31 March 2006 14:20, Luke Plant wrote: For those who are interested (and for the record):
Here is the relevant bit of the log I was talking about: GET /admin/officers/application/ HTTP/1.1 Host: [removed] User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive Referer: http://[removed]/admin/officers/application/13/delete/ Cookie: sessionid=[removed] HTTP/1.x 200 OK Via: 1.1 LEGOLAS Connection: Keep-Alive Proxy-Connection: Keep-Alive Content-Length: 3923 Date: Fri, 31 Mar 2006 13:11:48 GMT Age: 48 Content-Type: text/html; charset=utf-8 Server: Apache/2.0.46 (Red Hat) mod_python/3.2.8 Python/2.4.2 Vary: Accept-Encoding,User-Agent LEGOLAS here is my proxy (yes, all the server machines are named after Lord of the Rings characters!). So after deleting an object, the browser is redirected. to /admin/officers/application/ . However, the page returned is obviously from a cache somewhere - it has an 'Age: 48' header, and it was indeed an old page. So the issue here is entirely to do with an intermediate web cache, and from what I can tell ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13 ), the cache is behaving itself perfectly well - since the page had no 'Expires' header, caches are allowed to use heuristic mechanisms to guess an expiration and cache until then. So we should definitely use @never_cache on all the main admin views. On views where the data loss mentioned before isn't possible (such as the list view), it isn't so important, but the use of the 'messages' displayed to the user mean that the page can change even when the list of objects is identical, so it's still better to have @never_cache. Regards, Luke -- A woman's mind is cleaner than a man's. She changes it more often. (Oliver Herford) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers -~----------~----~----~----~------~----~------~--~---
