Title: Manually refresh page
Last modified: January 22, 2020

---

# Manually refresh page

 *  Resolved [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/)
 * I am about to move from W3TC and installed the latest version 9.0.2. All goes
   very smoothly!! Just one thing. I have many pages, generated from a database.
   When I change something in the database, I want to refresh some specific cached
   pages. In W3TC I just deleted the cached page from the cache folder and requested
   for that page. W3TC generated that page and saved the content in the cache folder.
   
   In WPFC I can delete the cached content, request the page, goes well, but the
   generated page is not stored in the cache folder. When I then request the page
   in my browser, the page is re-generated. In the footer of the page I read: “<!–
   Need to refresh to see the cached version –>” Is there a way to enforce the storage
   of a specific page in php? Or perhaps by calling a public function in your package?
   Furthermore only compliments on your plugin!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmanually-refresh-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12352468)
 * I have a work-around for now: I save the retrieved page myself in the folder 
   that holds the cashed data. That works! Only the statistics of the build of the
   page are disappeared. Not a big deal, but maybe there is a better solution
 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12353167)
 * Unfortunately this is not working correctly: minify css and compression are not
   done!
 * I tried the option: ?action=wpfastestcache&type=preload but that does not work
   for the specific page.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12356435)
 * We are working on a beta feature as below. do you want this feature?
 * [https://www.wpfastestcache.com/features/automatic-cache/](https://www.wpfastestcache.com/features/automatic-cache/)
 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12356555)
 * This is definitely an improvement, but I have to do it manually. I have to respond
   to changes in the records in a table! I have a job that does the work. In simplified
   code this is what it is:
 * if (changedInDatabase(1234)) {
    delete(path . “…./all/mypage/1234/”); data=request(“
   www.mysite.com/mypage/1234/”); // alter this … deregisterInDatabase(1234); }
 * For me it would be a solution if the third line would respond to something like:
   
   data=request(“www.mysite.com/mypage/1234/?action=wpfastestcache&type=**recache**“);
 * Do you think this is possible? Now I do get the page, but no caching is done!
    -  This reply was modified 6 years, 4 months ago by [hsteigstra](https://wordpress.org/support/users/hsteigstra/).
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12359175)
 * this is not possible 🙂
 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12360561)
 * Not possible or a challenge to implement??
 * Or… why do I get the cached and minified page when requested via the browser,
   but not when requested from the background process. After requesting the page
   from the browser, I do get the cached page in the background process…..
    -  This reply was modified 6 years, 4 months ago by [hsteigstra](https://wordpress.org/support/users/hsteigstra/).
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12362342)
 * if you write a code manually, you can do by yourself. you do not need a function
   of wp fastest cache.
 * with PHP;
 * `file_get_contents("http://www.mysite.com/mypage/1234")`
 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12362382)
 * This is what I already do…. Unfortunately I get the unzipped, not minified version.
   The cache is NOT rebuilt! It looks as if the WPFC thinks the request comes from
   a logged in user, but it is done by the server running in the background, not
   me!
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12363041)
 * you should use the following code because you need to exclude the admin cookie.
   Do you know how to use wp native functions?
 *     ```
       $url = "http://www.mysite.com/mypage/1234";
       $response = wp_remote_get($url, array('user-agent' => $user_agent, 'timeout' => 10, 'sslverify' => false, 'headers' => array("cache-control" => "no-store, no-cache, must-revalidate, post-check=0, pre-check=0")));
       ```
   
 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12363259)
 * Almost there! I don’t have experience with the wp native functions, but yet implemented
   the code. Only after removal of the parameter array I got it working!! I just
   cannot get the body data itself, what I only need to check the success.
 * Anyway, the data is rebuilt correctly now, and hopefully I will find my way to
   retrieve the length of the response. This is now the code:
 * $response = wp_remote_get($uri);
    if ( is_wp_error( $response ) ) { report error;}
   else { $body = wp_remote_retrieve_body( $response ); $data = json_decode( $body);
   $len=strlen($data->Data); // >> is zero }
 * Thank you for your assistance !!
 *  Thread Starter [hsteigstra](https://wordpress.org/support/users/hsteigstra/)
 * (@hsteigstra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12363778)
 * I also got the content now. This is the complete code to retrieve the data:
 * $response = wp_remote_get($uri);
    if ( is_wp_error( $response ) ) { report error:(“
   Failed to retrieve $uri”); $len=0; // failure! } else { $body=$response[‘body’];
   $len=strlen($body); // success ! }
 * Thank you for your assistance !!
    -  This reply was modified 6 years, 4 months ago by [hsteigstra](https://wordpress.org/support/users/hsteigstra/).
      Reason: success now!
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12364191)
 * you are welcome 🙂 if you vote, you make me so happy. 
    [https://wordpress.org/support/plugin/wp-fastest-cache/reviews/?rate=5#new-post](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/?rate=5#new-post)

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

The topic ‘Manually refresh page’ 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/)

 * 12 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/manually-refresh-page/#post-12364191)
 * Status: resolved