[dev] Question about Horde_Cache and chora

Chuck Hagenbuch chuck at horde.org
Wed Jan 14 17:46:42 PST 2004


Quoting Jason Rust <jrust at rustyparts.com>:

> I'm trying to fix a bug in the svn implementation of chora.  A couple of
> times there is this line in VC/svn.php:
> $psOb = unserialize($cache->getData($cacheId,
> "serialize(SVNLib_Patchset::_getPatchsetObject('$filename', '" .
> $rep-sourceroot() . "'))", time() - @filemtime($filename . ',v')));
>
> The problem is that $cache->getData() requires the third argument to be
> the lifetime of the file being pulled from cache.  However, there is no
> way with svn to access the filemtime of the file because everything is
> stored in a berkley DB.  The file can only be accessed using the svn:///
> or file:/// schemas.  So, is the solution to just get rid of caching in
> these cases or is there some other way to get the lifetime?

Well, if there's no way to get the last modification time of the file, seems
like the only thing to do is to ditch the cache altogether, or to set it for
something like time() - 360 (expire cached data after 1 hour).

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"Here, I brought some cole slaw. It's made from peeeooople! Just kidding."


More information about the dev mailing list