emulating eaccelerator's "delete expired" button (ala stat once on demand)

64 views
Skip to first unread message

_ck_

unread,
Jan 2, 2012, 9:40:01 AM1/2/12
to XCache
I'm switching some servers from eaccelerator to xcache as eaccelerator
has sadly fallen behind and even removed their variable data cache.

One feature I liked when running with stat off (file update checking)
was their control panel has a "delete expired" button which instead of
clearing the cache entirely, instead it does a stat on all the files
in the cache - once, on that one request, and deleted only ones with
newer files.

On a busy server with a thousand files in the cache, delete expired is
far more friendly that rebuilding 1000 opcodes, when updating just a
file or two.

I guess this could be done via the api If it's possible to examine and
delete cached files on demand but I'd love to see a "delete expired"
right in the control panel for the next release.

I think I read somewhere that xcache doesn't even bother to store the
file timestamp info at all if stat is turned off, so that may be a
problem with this feature request. If this is true I could instead
just check for files on disk that are also in the cache and have a
timestamp that is only "x" minutes old.

_ck_

unread,
Jan 2, 2012, 10:49:16 AM1/2/12
to XCache
I thought I got clever and noticed xcache stored ctime which may have
been good enough to compare to the file's mtime when it was modified.

But experimenting using xcache_unset on filenames fails entirely and
xcache_clear_cache will only clear an entire memory block by id, not
individual entries by id.

So unless I am doing this incorrectly or there is an undocumented API
call, I guess this concept is completely dead in the water.

If it's impossible in 1.3.x perhaps it can be slated for 2.0

Thanks for considering.
Reply all
Reply to author
Forward
0 new messages