• Resolved Spikee

    (@spikee)


    Hello,

    I use custom log in (into session) to fetch user information from ERP system and display real-time data, prices according to user preferences.
    Lets say, session name is: “erp_user”.

    I already defined DONOTCACHEPAGE true for “erp_user” and set headers.
    So in this session everything working fine, pages will not be cached to get real-time prices from ERP.

    The situation is different if a random (not logged in) visitor starts visiting (caching) pages. After this, logged in user with session “erp_user” will also get default cached pages.

    Is there any way to always display non-cached pages when specific session starts?

    I’ve tried the page cache fragment, but I’m lost in the template settings.

    …. Shop – woocommerce.
    …. WordPress user database can not be used (can not copy every user from ERP into wordpress)
    …. Standard solution: Non-logged in user: cached pages. Logged in user: non-cached pages.
    …. Expert solution: Logged in users cached pages with non-cached prices.

    Thank you.

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

    (@vmarko)

    Hello @spikee

    Thank you for reaching out and I am happy to help!
    Can you please share which caching method youa r eusing for Page Caching? And if you are using Disk: Enhanced can you please switch to Disk: Basic or any Memory based caching method?

    Thanks!

    Thread Starter Spikee

    (@spikee)

    Hello @vmarko

    Thank you for your answer.
    I am using Disc: Basic, because I found it in documentation for fragment page caching.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @spikee

    Thank you for your feedback.

    I am not quite sure what is the problem, and how this would work and how you expect this to work.
    Can you please atleast share the website URL, and explaing which part of the page you wanted to exclude from page caching using the page fragment cache?

    Thanks!

    Thread Starter Spikee

    (@spikee)

    Hello @vmarko

    Sory for my late answer. I tried multiple cache plugins and the problem pressist. It means the problem is NOT in your plugin. You can mark this as resolved, because this is not a plugin problem. I do not want to waste your time.

    Just to answer your question:
    what is the problem – I can not bypass cache for visitor with specific session.
    how this would work – when user logs in and starts specific session, he will get non-cached pages. (something like wp-login)
    test page is https://cz.ekofence.com/

    Thank you for your time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Donotcache defined in session not working for already cached pages’ is closed to new replies.