Redis Allow Stale Cache
-
I am wanting to set-up Redis Object cache in such as fashion that if a user hits a stale record, the stale record is served and in the background a fresh record is made. I have seen some Redis Page Cache plugins that do this but really would like it for object caching from W3 Total Cache and wondering if it is possible?
I am working on a real estate site and some of the objects just take time to construct. Site with object caching takes less than 50ms to serve as long as its within the TTL set in W3 Total Cache, but if over the TTL can take 5000ms with some of the pages that have thousands of properties.
I have a Redis server with plenty of ram to hold the entire site and of course max memory and policy are set just in case. I see my keys are not being evicted from Redis after expire which is the behavior we want but if someone hits a key that has an expired TTL then they get to wait for the regeneration and we would rather them see a fast stale page and the next visitor or even the same user on refresh would get the new. its not that critical if a couple new houses went active in MLS since the last refresh which we set at 3 hours anyway and end users fast experience is preferred.
any suggestions on how to accomplish this?
- The topic ‘Redis Allow Stale Cache’ is closed to new replies.