Set up WP Fastest Cache with Optimus Prime in Local Mode

Optimus Prime is a cache warmer to load web pages faster on initial load by querying all pages on a websites sitemap via the sitemap URL, it works in harmony with a cache plugin preloading tool.

Optimus Prime also has a local mode in which it checks the local cache folder for cached relative URLs and only fetches whats missing from the sitemap URL, this speeds up the cache priming process but is only possible if the cache plugin stores its cached pages in folders named relative to the original URL – plugins like W3 Total Cache and WP Super Cache do this and so does WP Fastest Cache.

First up is to install and set up Opimus Prime on your server then run the command from the server or better yet set up a cron job.

Running Optimus Prime in local mode with WP Fastest Cache

/home/mysite/ocp/ocp -l /home/mysite/public_html/wp-content/cache/all

So run the above command for Optimus Prime with a paraneter of ‘-l’ to prime the cache folder ‘all’ which is where the relative URLs are stored as folders, change the path names and URLs to suit.

Run as a Cron command

Use the same command in a cron job

Cron Wp Fastest Cache Optimus Prime

Here I have set the command to run twice per hour.

One caveat with WP Fastest Cache is that when its cache is cleared the folder ‘all’ is temporarily moved to folder ‘tmpWpfc‘ while the cache is being deleted, then it is reinstated so in the unlikely event of a collision in timing the cron may fail but will succeed in its next iteration.

Leave all Comment