Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #123394
    Emiliano Gonzalez
    Guest

    Hello,

    We are using the free version of the W3 Total Cache plugin. We wanted to know if the Pro version includes a configuration to allow us to cache a few pages. Now, we have the cache only enabled to NOT logged-in users. But, we want to cache a few pages (URLs), it always doesn’t matter if the user is logged in.

    Is that possible?

    Thanks

    #123639
    Marko Vasiljevic
    Keymaster

    Hello Emiliano,

    Thank you for reaching out and I am happy to help!

    The general rule is that you should not cache the pages for logged-in users, simply because of the reason you mentioned. Once cached, the pages will show for the next visitor as cached. This may lead to the sharing of some sensitive information.

    You cannot have separate cached pages from logged-in users and non-logged-in users. And even if that is available, you should have a separate cache based on the user to avoid sharing some sensitive/account details. This means, more caching, and more server resource consumption. Not to mention that the separate user caching would have to be based on the data that the user provides, and we cannot collect this data due to the GDPR rules.

    However, W3 Total Cache is an advanced plugin for a reason, and you can achieve what you need, but this means some specific configuration.

    As a guideline, you should disable caching for logged-in users and only allow caching for subscribers/customers (If this is the user role). Next, Browser Caching is a big NO in this case, so you should modify the Browser Cache for the HTML and set the expires headers to not cache and no-store. This will also impact non-logged-in users.

    And of course, any pages with sensitive information like checkout, cart, or account should be excluded from the cache.
    The login/logout is also something that should remain dynamic, so this depends on the plugin you are using for this. and you can use Page Fragment Caching, and wrap the PHP code for the login/logout with the mfunc to exclude that part of the page from being cached. Alternatively, you may use AJAX call for login/logout.

    to direct your question directly, There is no way to only cache a couple of pages for logged in users. There is no option to add pages to cache only to exclude them from being cached.

    I hope I explained this and let me know if you have any other questions.

    Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Page Cache to Logged in Users’ is closed to new replies.