• Resolved Jay

    (@jaytfl)


    Hi there,

    We are using Simple History since quite sometime. However, recently we have implemented WP Rocket and we found out the incompatibility issues of it with Simple history.

    When we enable the page caching on, be it on WP Rocket or any other plugin, the additional action hook to track the page visits through Simple History does not work anymore.

    Please let me know how can I get both Simple History and WP Rocket work together.

    Thanks,
    Jay.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jay

    (@jaytfl)

    Below was the response from WP Rocket’s team:

    Your implementation is not compatible with caching. PHP and MySQL processes don’t run on cached pages.
    It will run only for the first time cache is created. Same with cache for logged in Users.

    These articles give a good overview:
    Does WP Rocket Support Fragment Caching?
    Caching for WordPress, Explained in Plain English

    To verify, that page caching is the culprit, you can install this helper plugin Disable Page Caching For Logged-In Users that will disable page caching for logged-in users but will preserve optimization.
    You should clear cache after installing the helper plugin.

    If the logs start working after that, this means page caching is indeed the culprit.
    This helper plugin will “resolve” the issue with logs when user is logged-in, but you will need to decide if you prefer to keep page caching or the custom logs.

    Let me know if you need any further assistance, I am happy to help. 🙂

    Plugin Author eskapism

    (@eskapism)

    I sounds like you track page visits using some WordPress hook that is normally fired during page load. Since you use a cache solution the hooks don’t fire. A solution would be to use JavaScript to trigger a call to an API endpoint on your WordPress installation, bypassing the cache system. The API endpoint could then log the visit to Simple History.

    Thread Starter Jay

    (@jaytfl)

    Thanks for the quick response! Appreciate it 🙂

    You can ignore responding to the below question since it may not have directly anything to do with the question raised.

    How would we make sure that the API endpoint is not left open and can be triggered only at the system’s end? Basically, since it’s a JS AJAX call, how would it be more secure?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Imcompatibility with page caching’ is closed to new replies.