Hello @futureyoon
Thank you for reaching out and I am happy to help!
The Garbage collection interval is dependent on the cron job and it’s used only when the Object Caching is set to Disk. This sets w3_objectcache_cleanup to run every hour (default value) The lifetime of cache objects is not using a cron job.
You can install and activate the WP Control plugin and Upon activation, you need to visit the Tools » Cron Events page to control cron settings.
You will see a list of all cron events scheduled to run on your site using the WordPress cron system.
In the first column, you will see the name of the hook that runs the cron, in this case, w3_objectcache_cleanup if, and I repeat, you are using Disk as a caching method, which in general should be avoided and you should consider using memory-based caching like Redis or Memcached.
Thanks!
OK. Thank you for the comment. @vmarko
That means..
Q1: If I used Object Caching to Redis, garbage collection interval will not happen at all? or it will happen, but just that it’s not done by cronjob?
Q2: And you mentioned ‘lifetime of cache objects’ is not using a cron job, I guess then it has own clock to kick off the job somehow. right?
Q3: A question is…
is there a way to check if above 2 mentioned jobs have run anywhere from the system?
Please kindly advise.
Thank you
-
This reply was modified 3 months ago by
futureyoon.
-
This reply was modified 3 months ago by
futureyoon.
-
This reply was modified 3 months ago by
futureyoon.
sorry i came back late. Thank you for the update.
Just a suggestion
You can put a note at “Garbage collection interval” area that this will work only when ‘Disk’ is selected.
Other than that, I am clear with all other answer except one below.
I am using Redis for object cache.
so do I need to turn on the cronjob in order for this “Default lifetime of cache objects” job to work? or without turning on the cron job (define( ‘DISABLE_WP_CRON’, true );), this will automatically flush the object cache?
Please kindly confirm. Thank you
-
This reply was modified 2 months, 3 weeks ago by
futureyoon.
-
This reply was modified 2 months, 3 weeks ago by
futureyoon.