Step #3 Garbage Collection
Now we need to schedule the garbage collection. Basically It takes out the trash or old static files and replaces them with fresh static files. The fist line with the time and date in it will give you your server time and date. If this number does not read the same as on your computer you can change it it in general settings in WordPress.
By looking at the second line you can see when the next garbage collection is scheduled. You can see and example of this below. In the garbage collection settings you can disable a cache time out by entering a “0”. Since you are here you probably just need to imitate what we have set up.
As a starting point for mod_rewrite it is recommended that you set the timer to 3600 seconds for stale cached files. Basically when a visitor loads that page and the program sees that that page is old and expired it will generate a new fresh page for your visitor. You could also use the clock to check for stale cached files so that it check it the time of day that you want it too. This would be helpful if you have a very large site and you set this to a time of day when you have the least visitors. You can slow choose to have garbage collection done once a day, twice a day, weekly, monthly or even hourly.
One thing that you can do is have your server email you when garbage collection runs. This get’s irritating after a while but you may want to enable it to make sure that it is working. You can always come back and disable it late. It will operate off of the email address that you have in your general settings.
Expiry Time & Garbage Collection
UTC time is 2014-09-06 16:29:09
Local time is 2014-09-06 12:29:09
Next scheduled garbage collection will be at 2014-09-06 17:29:09 UTC
Do not forget to click “change expiration” when you are done! 🙂
Step #4 Accepted Filenames & Rejected URIs
Lets say that you have set your garbage collection for 1 week but you update your featured page every day? Well you would not want to cache it because you want the freshest dynamic content on that web page. This is where you would choose NOT to cache certain files. Just leave them all unchecked if you are not sure. 😉
Do not cache the following page types. See the Conditional Tags documentation for a complete discussion on each type.
1 Trackback