Sometimes sticky posts won’t unstick w/o cache flush
-
I have found that every once in a while, admins on a site that I am using this plugin for either cannot sticky a post or cannot unsticky a post unless I manually flush the redis cache (which always immediately fixes it).
The site goes for long periods of time without any issue, but once the problem arises, it will persist until I flush the cache.
I went digging into how WP caches the list of sticky pages and it is apparently stored in redis in the options group under the key
options:alloptions
along with, as the key suggests, all the other options, which makes it a pretty honking huge value.Here’s my theory of how this problem is happening: my guess is that the long period between problems is because it only happens when the redis cache gets full or close to full (
maxmemory 2GB
) and somehow when it comes time to evict old key-value pairs, redis can’t make enough space to store the newoptions:alloptions
data so the old one persists.So, just wondering if any other users of this plugin have run into this issue and have found a work-around.
I may just resort to excluding the
options
group from redis using the newWP_REDIS_IGNORED_GROUPS
define (thanks Till!), but it would be nice to be able to persistently cache that huge blob of data in memory if possible.
- The topic ‘Sometimes sticky posts won’t unstick w/o cache flush’ is closed to new replies.