• Resolved alyxleclaire

    (@alyxleclaire)


    Hi!

    In W3 Total cache > Performance > General Settings > Page Cache,
    The “Purge Cache” and “Empty Cache” button is not working.

    No matter what configuration I try to use, the “Empty Cache” button redirects me to
    https://web/?w3tc_note=flush_pgcache

    Which displays in the Browser: ERROR Page not found

    When using “Page Cache Method: Disk: Enhanced”, the files are created in the /wp-content/cache/page_enhanced/ folder successfully. But the Purge Cache and Empty Cache buttons do not delete any files inside that folder.

    When using “Page Cache Method: Opcode: Alternative PHP Cache (APC / APCu)”, the files are created in the /wp-content/cache/page_enhanced/ folder successfully.

    But the Purge Cache and Empty Cache buttons do not clear up the APC memory. I confirmed by checking the server APC statistics (via this method https://www.php.net/manual/en/apc.configuration.php ). I am able to clear my own APCu memory in the server, but not* through the WordPress W3 Total cache Plugin Page.

    Is this a problem with the plugin or with my installation/configuration process?

    Lastly, there is one odd thing I want to ask about. After enabling preview mode in WP Admin > Performance > General Settings > General > Preview Mode > Enable , and then going into the Preview of my Site, the Query Monitor Plugin shows the following message:

    “The APCu extension for PHP is installed but is not in use by WordPress
    “External object cache not in use
    Opcode cache in use: APC
    Opcode cache in use: Zend Opcache”

    I can confirm that APCu indeed contains entries such as “w3tc_1738895883__0_pgcache_edc15ea8a41c1071c1bd31db5622704f_ssl_gzip ”
    “w3tc_1738895883__0_pgcache_edc15ea8a41c1071c1bd31db5622704f_ssl ”

    So I am wondering, how do I confirm that the Site is actually showing the Users the static HTML pages from APCu?

    thanks,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @alyxleclaire

    Thank you for your inquiry and I am happy to assist you with this.

    Purging or emptying the cache does not delete the files from /cache/page_enhanced/ folder. It creates _old files and those files are old cached files. New files are being created once the page is visited. Removal of the old cached files is being taken care of by the option “Garbage collection interval:” in Performance>Page Cache which if caching to disk, specifies how frequently expired cache data is removed. For busy sites, a lower value is best.
    As for APCu, it’s the same behavior but only depends on APCu TTL. In general, a cache manager SHOULD keep your entries for as long as possible and may delete them if/when necessary. Expired entries are not automatically deleted, nor should they be, because APC is configured with a fixed memory size (using apc.shm_size configuration item) and there is no advantage in deleting an entry when you don’t have to.
    The last question is the question for the Query Monitor Plugin because as you stated the APCu works as expected.
    You can inspect the page and check if it’s served from the cache in the Network tab.
    I hope this helps!

    Thread Starter alyxleclaire

    (@alyxleclaire)

    Thanks. That helped and clears up a lot. ??

    I’ve looked at the Browser > Network Tab and I see that the document /mypage/ of type HTML, says Status 200 “Transferred: Service Worker”.

    Comparing that with my CSS, JS, and images, which shows Status 200 “Transferred: cached”

    From my understanding, cached in the Network Tab means that the User has cached a file in the User’s Browser.

    Furthermore, I gather that it is not good practice to have the User cache a HTML file in their browser because of risk of seeing expired pages.

    Please correct me if I got this wrong, what W3 Total cache Page Cache does is have the Server generate the static HTML page from the PHP code and Database entries, and then Cache the static HTML page in the Server side. Finally, it delivers that cached HTML page to Users when requested. This prevents running PHP a lot, having the Server run out of RAM, and get code 500 server errors.

    So, more specifically the question is, how can I tell from the Network Tab or otherwise, whether the static HTML page store in the Server APCu memory was delivered to the User?

    thanks,

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @alyxleclaire

    Can you please share your website URL? Are you using any other caching solution?
    Thanks!

    Thread Starter alyxleclaire

    (@alyxleclaire)

    Marko,

    w3tc is the only caching plugin I am using.

    The server has mod pagespeed enabled which does some caching on the server side, only of CSS, JS, and images. Mod pagespeed doesn’t cache html files from what I understand.
    ( https://www.modpagespeed.com/doc/configuration )

    Turning mod pagespeed off still shows Status 200 “Transferred: Service Worker” for the /mypage/ HTML file in Network tab.

    Unfortunately I cannot share the URL. But I can help by providing other info you need. Which info did you want to look at?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @alyxleclaire

    You stated that you can see that the page is cached in the wp-content is that correct?
    When you open the page and inspect the source is there an HTTML snippet at the bottom of the page,. something like:
    <!–
    Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

    Page Caching using APCu

    Served from: yourwebsite.com @ 2020-06-19 12:22:55 by W3 Total Cache
    –>`

    Thanks!

    Thread Starter alyxleclaire

    (@alyxleclaire)

    Cool! That worked! I see the comment in my pages.

    “<!– Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/ Page Caching using apc Served from: wwwmysitedotcom @ 2020-06-19 13:33:24 by W3 Total Cache –>”

    Awesome! I’m so happy!
    Thanks for this amazing plugin, and keep up the good work Marko
    ??

    • This reply was modified 4 years, 5 months ago by alyxleclaire.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review?here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Empty Cache button redirects to ERROR Page Not Found. Purge is not purging files’ is closed to new replies.