• Resolved Hustle OU

    (@hustleou)


    I am using a $_SESSION related variable in a shortcode in the Redirection plugin. This shortcode generates a unique hashed value per every different session.

    For some reason, when enabling the W3 Total Cache, the generation of this {session_id} unique ID gets cached and therefore the same value is served for different sessions. The expected behaviour is that a unique value is generated per each session. Without the W3 Total Cache plugin enabled, it works correctly.

    So I am wondering, which of the different cache types: Opcode Cache, Browser Cache, Page Cache, Database Cache, CDN, Object Cache could cause this issue.

    Or even more detailed…which of the specific options in the W3 Total Cache could cause this issue.

    • This topic was modified 8 months, 1 week ago by Hustle OU.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Hustle OU

    (@hustleou)

    I managed to make this work, that means, for the shortcodes not to get cached, by checking this option:

    Page Cache > Advanced > Late Initialization

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hustleou

    Thank you for your response and for sharing the solution.

    Yes the Late Initialization helps in use cases like this when the Page is Cached.
    Glad to know you found the soluton for this.
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Which cache type affects shortcodes?’ is closed to new replies.