This is a work in progress, just posting this so I don't forget about it (again).
The idea is to add a status page with some statistics and also specific information about render cache entries.
It is not finished but I'd love some feedback on running this on larger data sets, to see how long it takes to process 100k or more cache entries.
Will likely move the slow part to a separate page.
EDIT: Related module: Redis Info.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | redis-statistics-16-interdiff.txt | 11.9 KB | berdir |
| #16 | redis-statistics-16.patch | 11.68 KB | berdir |
| #7 | redis-statistics-7-no-client.png | 6.99 KB | o'briat |
| #7 | redis-statistics-7-statistics.png | 32.03 KB | o'briat |
| #7 | redis-statistics-3-7-interdiff.txt | 3.91 KB | o'briat |
Comments
Comment #2
o'briatIt works on my dev environment, I'll try it later on a staging one.
Some minor remarks :
the redis.info.yml referers to an undefined route :
This should be change to redis.report.
A link to this page should be added to the hook_help() and hook_requirements() (is this one should be placed into the module file instead of the install file?).
Don't forget to add the prefix key.
I'll also try to add some additional information about sentinel mode.
Comment #3
berdirComment #4
berdirHere's a new version of the patch with some improvements.
Comment #5
wim leersNice! :)
Eh :)
Comment #6
berdirYeah, forgot to remove that.
Comment #7
o'briatHi, I test this patch, I just found an error if no client is configured. So I had a test on it and display the same message that found in redis_requirements.
I also made some php code sniffer linting.
Page OK :

No client :

Comment #8
grimreaperHello all,
Thanks for the patches. I am currently testing it.
I have a feedback to give.
Maybe for the "Keys per cache bin" info, an alphabetical sort would be better than a sort based on the number of results.
So the cache bins would always be in the same order no matter the number of keys.
Comment #9
grimreaperHello,
To not forget, I already said it IRL to @O'Briat.
It would be nice to have a link on a Redis documentation page on how to configure the memory handling. For the row "Memory" When it is in warning.
Thanks.
Comment #10
o'briatHi,
I'll provide a patch, here's an overview :
Also about the message "No cache tags found, make sure that the redis cache tag checksum service is used.", a precision could be added: " or you're not using developing settings." :)
One last thought : should the content of the readme.md be copied to the help page ?
Comment #11
o'briatIs
volatile-lris enough orallkeys-lruwould be a safer settings ?Is all Drupal cache keys have Redis "expire set" ?
Comment #12
berdirBy default we add a one-year expiration to all cache entries, yes, so that technically makes them volatile. So using volatile-lru should actually allow you to not accidently remove cache tag, flood and other entries like that.
I think the one year thing can be changed, but there isn't really a good reason to do that IMHO.
Comment #13
berdirThe 100k limit is actually not existing yet.
Also, this takes too long on an actual site with many invalidations as we fetch them all. I guess we need to split that up into separate pages or so.
Comment #14
amonteroLinking to related module (Redis Info) for completion.
Comment #15
landsman commentedThis is looking good, is here some new progress please? :)
Comment #16
berdirUpdated this to also work with predis (although I just learned that it is basically unsupported now), added some checks on the cache tags limit and also included the improvements from O'Briat.
Comment #17
andypost@Berdir what you mean with unsupported? Pecl extension looks perfectly supported
Comment #18
berdirPredis is the php library, which is unmaintained. php-redis is the extension.
Comment #20
berdirFinally committed, lets see how well this will work :)