pantheon-systems / wp-redis

WordPress Object Cache using Redis.
https://wordpress.org/plugins/wp-redis/
GNU General Public License v2.0
226 stars 68 forks source link

Add constant to set default cache expire #263

Closed jimvandervoort closed 4 years ago

jimvandervoort commented 4 years ago

This PR adds WP_REDIS_EXPIRE_SECONDS constant to customise default expire. I added this because on our Redis instance keeps growing with some plugins not setting sensible expire times. Setting a (long) default expire time allows us to work around this issue.

danielbachhuber commented 4 years ago

Thanks for the PR, @jimvandervoort !

For clarity, can we call the constant WP_REDIS_DEFAULT_EXPIRE_SECONDS ?

jimvandervoort commented 4 years ago

@danielbachhuber yeah that's better. Changed to WP_REDIS_DEFAULT_EXPIRE_SECONDS!

danielbachhuber commented 4 years ago

Thanks @jimvandervoort . Landing this in #264

danielbachhuber commented 4 years ago

Just tagged v0.8.1 and released to WordPress.org. Thanks again!