-
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
Description
Description
If wp_cache_set has set the expiry time, then do not update with WP_REDIX_MAXTTL config.
Expected Behavior
If a certain cache is set to expire within an hour, it should not use WP_REDIX_MAXTTL expiration value.
Actual Behavior
If a certain cache is set to expire within an hour, and WP_REDIS_MAXTTL is set to expire the whole cache within 24 hr. Then the previous cache set for an hour to expire is also updated to 24 hours.
Possible Fix
This might help if the expiry is just 0, then respect WP_REDIS_MAXTTL, but if that is set, do not modify.
Steps to Reproduce
- Define WP_REDIS_MAXTTL with
86,400for a day. - Set up two caches with expiry and non-expiry time.
- Check the expiry set cache, it should be using the
WP_REDIS_MAXTTLvalue. - Kudos, you must replicate the steps to reproduce.
Additional context
I need to expire certain cached areas, but it is not letting me do with WP_REDIS_MAXTTL overriding.
Environment
- Plugin version: 2.7
- PHP version: 8.3
- WordPress version: 6.8.3