Document how to use wp_cache_add_redis_hash_groups()?
-
Could you provide some documentation for how to use
wp_cache_add_redis_hash_groups()
? I’ve been looking through this forum and GitHub, and I think it might be helpful for me but I’ve been unable to figure out exactly what to do with it.The problem I hope to solve is that I was using the Redis Object Cache plugin, but I ran into two significant problems:
1. The server ran into memory overload issues. Redis had 1GB of memory allocated to it, and our host is confident this should be enough for anything normal.
2. We had users who were constantly being required to log in again multiple times within a day.Redis is clearly causing WordPress to ignore this code, which should keep users logged in for one year:
if ( ! function_exists( 'keep_me_logged_in_for_1_year' ) ) : add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' ); function keep_me_logged_in_for_1_year( $expirein ) { return 31556926; // 1 year in seconds } endif;
So my thinking was that if I could get Redis to ignore the group that stores user login information, maybe I could solve both issues.
I’m curious if this seems like a reasonable expectation, and if it does, how I might use
wp_cache_add_redis_hash_groups()
to achieve this?
- The topic ‘Document how to use wp_cache_add_redis_hash_groups()?’ is closed to new replies.