Andreas Stieger wrote on Sun, Mar 08, 2015 at 17:52:55 +0100: > On 08/03/15 17:45, Branko Čibej wrote: > > And it bears repeating: If you replace a repository, please make sure to > > restart Apache and/or svnserve to clear stale caches. > > Is there something that can be done in the code to take care of that? > Like watching the inode as {uuid,inode}-2-tuple and flush the caches if > it changes?
It might be interesting to try and flush the caches if "youngest" had gone back in time. That is, if we know that the repository at a given (UUID, dirent) had once had r200, and right now its youngest is r100, then flush all caches related to that (UUID, dirent) pair. Perhaps there are other invariants we could also check in a similar manner, for example, the md5 of the text-rep of the node-revision of the root directory at the (cached value of youngest) revision: if the md5 changes, then the cache is stale.. Daniel