New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Useful metrics for people using 'expire cache' #615
Comments
Thanks for the suggestion, I'll consider adding this in a future release.
What exactly would be the benefit of this, and what do you imagine the UI looking like? |
This is a great solution. Just sorting by expiryDate should suffice: it's either null or on a date spectrum from past to future. Is/can that date be adjusted to show relative to the users timezone? Makes tracking down why a page has not been refreshed (failed cron job or some other reason) much easier than having to lookup UTC time conversions all the time :-) |
Agreed. I’ve removed the filter.
Yes, I’ve made it so the date is localised. You can test this by running |
Magnifique! This makes it so easy to see whats going on with the expired caches. Our challenge now is to work out why some are not getting expired.. but thats not part of this issue/request. Close and merge or whatever fun things you need to do to get this into production. Thanks |
Released in 4.11.0. |
For us using the 'Expire caches' mode, it would be useful to see a new entry in Blitz Diagnostics:
nnn Expired caches
Click on that to see the list from a query like this:
select id,siteId,uri, date_add(expiryDate, interval 630 minute) as expiryDateADL, now() from blitz_caches where expiryDate is not null order by uri;
I find this query useful to see which pages have expired caches and converting them to my local timezone (not sure how that would be done in craft using user preferences).
I'm also curious, and would like to see
select count(*) from blitz_caches where expiryDate is null
to so I can get a sense of it growing as compared to the file system. Maybe not all that useful for others tho :-)Talking of stats, it would be great to see a log of each entry that was refreshed due to an expired cache and if a cron job or an organic query refreshed it.
The text was updated successfully, but these errors were encountered: