Title: Rebuild existing cache
Last modified: August 24, 2016

---

# Rebuild existing cache

 *  Resolved [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/rebuild-existing-cache/)
 * I really like the plugin. It is efficient and easy to use.
 * I would like to know if it is possible to force the existing cache to refresh
   in place? (so create a new cache of whatever is already cached)
 * The reason to do so instead of using the schedule delete of the entire cache 
   is to avoid a user encountering a non-cached page and having to create the cache
   on page load. It is preferable for the system to prime the cache (taking however
   long it takes) so all user requests are fast.
 * If not possible to do so for entire cache, is it possible to delete a specific
   page’s cache using a url parameter? I would then create a script that clears 
   the cache for the page and immediately reloads the page. Not as good as option
   1 (refresh cache on back-end), but still reduces likelihood of user getting an
   uncached page.
 * [https://wordpress.org/plugins/wp-fastest-cache/](https://wordpress.org/plugins/wp-fastest-cache/)

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

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997358)
 * >  if ( isset( $GLOBALS[‘wp_fastest_cache’] ) && method_exists( $GLOBALS[‘wp_fastest_cache’],‘
   > singleDeleteCache’ ) ) {
   >  $GLOBALS[‘wp_fastest_cache’]->singleDeleteCache(false,
   > $post_ID); }
 * Can you try it please?
 *  Thread Starter [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997463)
 * Emre, I thank you for the code. It works as intended.
 * Is there a way to load a page into the cache as well?
 * Something like:
    $GLOBALS[‘wp_fastest_cache’]->cachePost($post_ID);
 *  Thread Starter [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997493)
 * I stand corrected. While the code itself seems to do what it needs to, the browser
   does not load the updated content unless I clear the full cache.
 * Am I missing something where I can instruct the cache to send the browser the
   updated data?
 *  Thread Starter [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997609)
 * I resolved the issue by creating a back-end shell script to remove the cached
   paged and then load them, essentially clearing the cache for each page.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997611)
 * ow I forgot you 🙁 sorry. If you fixed it, that’s nice 🙂
 *  [mdroca](https://wordpress.org/support/users/mdroca/)
 * (@mdroca)
 * [11 years ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997677)
 * I would like the code too.
    yk11, could you publish the code here, and explane
   where / in which file add this?
 * Thanks in advance!
 *  Thread Starter [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [11 years ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997678)
 * The bash script is a back-end process which I run under cron.
 * The script iterates through the pages I want to refresh and performs the following
   actions:
    – Remove page: `rm ~/www/wp-content/cache/all/<page name>` – Forces
   a reload by reading the page: `wget -qO- -T 30 http://www.<domain>.com/<page 
   name> > /dev/null`

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

The topic ‘Rebuild existing cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [yk11](https://wordpress.org/support/users/yk11/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/rebuild-existing-cache/#post-5997678)
 * Status: resolved