[Zope-CMF] BT caching rant (was: Editing and caching conflicts)

seb bacon seb@jamkit.com
Fri, 8 Jun 2001 13:38:02 +0100


To answer your questions, the places content gets cached are at an
arbitrary number of caches between you and the server, and in your
browser.  In order to make sure your 'edit' mode content never gets
cached, you can add 'Expires' and 'Cache-control' headers in relevant
places.  Search the web for more info.  There's a howto here:

  http://www.zope.org/Members/htrd/howto/caching

Your problem is certainly a downstream cache at your ISP.  A very
similar thing has been happening to me lately.  The fact that an ISP
other than mine is doing the same thing is worrying.   It's not just
when you're editing it's a problem; you don't want users to get stale
content after you've been updating a site.

My ISP is BT OpenWorld, who are the main broadband ISP in the UK.  I
have been having a running battle with them over the past 3 months
regarding their utterly brain-dead transparent proxy.  

I've been slinging RFCs at them proving their caching policy is wrong;
I even went to the lengths of identifying their transparent proxy,
contacting the software company that made it, and getting them to
confirm that BT had it set up wrong.  None of this seems to matter to
BT, who don't want to know.  Incidentally, they've also got at least
one of their transparent proxies set up so it breaks up TCP
connections for requests for content without a '.html' extension so
that you can't connect to certain zope, or php, or asp sites.  But
that's another story.  Rant rant.

The main symptom is as you describe: caching pages while you're
editing them.  It gets worse though - BTOW also seems sometimes to cache
authentication information.  Several times I've visited websites,
including zope.org, to find myself logged in as someone else.

Anyway, the specific cause is that in the absence of any caching
validators (cache-control, expires, etag), BTOW is deciding to cache
by default.  This is wrong, but the problem is it's not specifically
banned in the specs; it's just discouraged.  Zope / CMF doesn't put
any validators in.  I've modified Zope to add an ancient Expires
header to everything, until I have more time to think of a better
solution.  As a quick fix for editing annoyances, you can also
manually set up your browser to use a less idiotic proxy, if you can
find one.  There are quite a few public ones about. 

What do other people do to make sure this doesn't happen?

Seb

* Jon Edwards <jon@pcgs.freeserve.co.uk> [010608 11:41]:
> I've had a lot of problems, when I'm editing documents TTW, with caching. I
> edit a document, view it, edit again, view it, then realise my second edit
> was actually on the original doc, before my first edit! grrrrr! I end up
> pressing Ctrl+F5 three or four times every time I'm viewing or editing,
> which obviously slows the process down a lot, and is likely to completely
> confuse inexperienced editors.
> 
> I suspect a lot of it is due to my ISP (Freeserve), but there are probably
> other caches involved in various places as well! Has anyone else come across
> this problem? Any ideas on how to make sure that view pages are cached as
> usual, but edit pages are NEVER cached?
> 
> Cheers, Jon
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests

-- 

   [] j a m k i t 
           
        seb bacon
T:  020 7749 7218
F:  020 7739 8683
M:  07968 301 336
W: www.jamkit.com