Hi,
I'm the author of the cache_browser module and I'm wondering if it would be possible to integrate with cache router.
For this, we would need a couple of things that cache router would have to provide:
1) A method to get a list of cache tables managed by cache router (name and description). Probably from $conf array?
2) A method to get a list of cache entries managed by each table.
Probably the second thing is harder to do?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | apc.php.txt | 943 bytes | andypost |
| #5 | eacc.php.txt | 956 bytes | andypost |
Comments
Comment #1
slantview commentedHi,
I really like this idea. It would be especially useful once I get the statistics information available. I don't think it would be too difficult to add some functionality that allows you to get a list of cache entries at all. I could add a method to each cache engine.
I'm gonna put this in patch (code needs work) as we need a patch, if someone does it before me, great, otherwise I'll add it to my list of things to do.
Steve
Comment #2
markus_petrux commentedSweet!
If that helps, here's a snippet of code I have extracted from a program I use to monitor memcache entries on our forums.
I wrote that a long time ago, and still works on our site :) ...though, we're not running the latest memcache/memcached version, so maybe there's an easier way to get this information.
Comment #3
andypostIt's really interesting - enumerate cache entries in memcache, it can be very useful to clear which is main problem of cacherouter
@markus_petrux Do you have some performance statistics about this - how long it takes to enumerate 1k , 10k entries?
Comment #4
markus_petrux commentedUnfortunately, nope. I use a similar code in our phpBB forums that I modified to cache just a few queries. We have 52 different entries in 3 separate memcached hosts (we have 4 apaches querying 3 memcached hosts via 1 Gbps ethernet). I runs quite fast, but I cannot tell how exactly.
I have modified the code to run the memcached queries in a loop, 100 times (which then reads 5200 entries from 3 hosts) and it took around 1 second, more or less.
Comment #5
andypostCode to enumerate keys for:
APC
Entry
and for eAccelerator
Entry
my tests on 10000 items (scripts attached)
APC
eAccelerator
Comment #6
andypostForget to say -
strpos()highly depends on size of keyComment #7
adamo commentedNo updates in a while... Anyone still working on this?