Title: automatic refresh the cache
Last modified: April 6, 2024

---

# automatic refresh the cache

 *  Resolved [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [2 years ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/)
 * Hi
 * I have set the maxmemory 2Gb, it gets fully utilized it seems. is there a way
   to auto refresh the cache in schedule basis like every 24hrs?
 * or
 * Other than refreshing the cache, is there any other settings that it can capture
   the new data (post or whichever datakey) in schedule or anytime it gets updated?
 * Please advise me on this.
 * Thank you

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [2 years ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17560477)
 * The cache will keep itself “fresh”. If you like to flush it every x hours, you
   can do that using `wp_cache_flush()`.
 * Ideally allocate more memory to Redis, so you can cache everything and key don’t
   flight for space.
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [2 years ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17561216)
 * Thank you for the info [@tillkruess](https://wordpress.org/support/users/tillkruess/)
 * That leads me to next questions as below.
 * What will happen if the memory gets full? it will wipe off the oldest data to
   clear up the space for the new incoming data?
 * What I have experienced so far is that the system (site) gets freezed whenever
   it hits the max memory. that’s the reason of I am checking to clear the object
   cache in regular basis to avoid the site breakdown.
 * Please advise me on this.
 * Thank you
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [2 years ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17678559)
 * > What will happen if the memory gets full? it will wipe off the oldest data 
   > to clear up the space for the new incoming data?
 * That depends on your configuration of Redis Server. You can set a `maxmemory-
   policy` in your `redis.conf` file to get Redis Server to evict old keys when 
   memory nears maximum. Ideally tho, allocate more memory to Redis Server so it
   holds all cache data.
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [2 years ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17678735)
 * yes, I got that.
 * I have set it volatile-lru, so i wud expect it clear the old dataset when the
   memory gets full, right?
 * but it’s again making the site freezed from time to time with 2gb max memory.
 * now I increased it to 4gb and monitor it.
 * Either it works well or not, it proves that old data doesn’t get cleared off.
 * any input wud be appreciated.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17688095)
 * Did you restart the Redis process after making changes to the `redis.conf`?
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17688308)
 * yes of course. Multiple times.
 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17691506)
 * What does your redis error log say after a freeze?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘automatic refresh the cache’ is closed to new replies.

 * ![](https://ps.w.org/redis-cache/assets/icon-256x256.gif?rev=2568513)
 * [Redis Object Cache](https://wordpress.org/plugins/redis-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/redis-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/redis-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redis-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redis-cache/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * Last activity: [1 year, 12 months ago](https://wordpress.org/support/topic/automatic-refresh-the-cache/#post-17691506)
 * Status: resolved