RE: [PECL-DEV] APC TTL Patch

From: Date: Mon, 09 Aug 2004 22:32:34 +0000
Subject: RE: [PECL-DEV] APC TTL Patch
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1095@lists.php.net to get a copy of this message
> Well, this patch doesn't quite do that. It cleans up as it > goes so it will take longer to fill shared memory, but it > doesn't remove the oldest entries when the cache fills. I am > contemplating adding an LRU stack as well so I can chop off > the bottom N% or so when the cache fills up. > OK, makes sense... Is the LRU a lot of work? > > Great, so it checks ttl on every new script insert? Not > just when out > > of memory? > > It only checks on an insert and on that insert it only checks > the specific hash slot the new entry hashed to. So if your > cache is full and you try to insert a new entry and none of > the entries in that specific hash slot are old, then that > insert will fail even though elsewhere in the cache there may > very well be stale entries older than the TTL. That's what > the addition of an LRU stack would address. > > > Can I get at this data (access_time) and output it on the > APC GUI you provided? > > Sure, I added an 'access_time' entry to the cache info. Look > for the $file['mtime'] and simply add another table column to > show $file['access_time']. Great, I'll be happy to modify the GUI code after I get the patches installed... > > > When do you intend to commit to CVS? > > I am still fiddling with it and, especially if I add the LRU, > this would be a rather major new feature which might not be > appropriate for a minor version. Makes sense and would agree. I don't use patch too often, normally on one file at a time, will patch take the entire contents of the email and apply them to the source tree if I tell it to without having to separate each patch and run them manually on each source file? Regards, Shannon > > -Rasmus >

« previous php.pecl.dev (#1095) next »