Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed1.swip.net!news.astraweb.com!border5.a.newsrouter.astraweb.com!border2.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 17 May 2014 05:01:43 -0500 From: "Chris Uppal" Newsgroups: comp.lang.java.programmer References: Subject: Re: invalidating caches Date: Sat, 17 May 2014 11:06:36 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Message-ID: Lines: 24 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-rRuFDccJInqCWo3SOmyf9FVVyASK+58GDx2EIMwemRI2Zk4Kt3rDCwuiUV04kdlKWgAUwdB988Fj5OV!J7xoB8gjuz78EFaygCbhmBjdnRUC5s8b8DuuwuUO5SRI7RiVTrz0a8nJUCHn93vyycbqLFbsshg= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2228 Xref: csiph.com comp.lang.java.programmer:28514 Sarah Connor wrote: > > One useful tip I learned from that tutorial is a server can effectively > > invalidate caches by renaming a document or image. The client will have > > to fetch afresh even if the original had a long time to live. > > That has the nasty side effect of breaking existing bookmarks and links > though. But, on the other hand, the link to the old version remains separate from the link to the "latest" version which can be a good thing. Nothing to stop a server having several links. One which always redirects to the latest, and others which point to specific versions. Note that provided the redirect is done at HTTP level (or equivalent) then the client and intermediates can still cache correctly. Or poor man's cache control: have a query parameter in the URL which the server always ignores, but which code on the client (presumably JavaScript in the typical case) sets to a fresh value on each fetch. -- chris