-
Notifications
You must be signed in to change notification settings - Fork 24
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
Setting TTL in Redis #27
Comments
hey @sddaniels this ticket is dated, but curious to follow along. Did you try this:
Or what did you end up doing? |
https://github.com/pressjitsu/pj-page-cache-red/blob/master/advanced-cache.php#L642 we actually do perform a Can we have a confirmation on this, please? |
I just checked and this is true, unfortunately. We are keeping these keys indefinitely. |
Hello @soulseekah and thanks for this very useful drop-in. We've been using it for a while but I just recently realised that the keys are never expired automatically, as it's mentioned in this thread. The cache is only expired and refreshed if you visit the page again, but old pages that are never visited again are lingering in the database forever... I've been testing and trying to figure out why, but unfortunately I couldn't make it work... one thing I was wondering is why are you not passing the expiration directly when setting the cache value? pj-page-cache-red/advanced-cache.php Line 508 in 46e7316
thanks in advance! |
It looks like there's a TTL setting available for this plugin, but it's only used for internal calculations. There is no TTL passed to Redis, so each page is cached indefinitely. That seems to be why the
allkeys-lru
eviction policy is recommended.With our current automation, we're not able to easily change this eviction strategy from the default, which does not evict any keys that do not have a TTL set. Is there any reason that this plugin couldn't optionally set the TTL in Redis?
The text was updated successfully, but these errors were encountered: