Title: Which cache type affects shortcodes?
Last modified: July 18, 2024

---

# Which cache type affects shortcodes?

 *  Resolved anonymized-23096784
 * (@anonymized-23096784)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/which-cache-type-affects-shortcodes/)
 * 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.
 * ![](https://i0.wp.com/i.imgur.com/6VujLjR.jpeg?ssl=1)
 * 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 1 year, 10 months ago by anonymized-23096784.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter anonymized-23096784
 * (@anonymized-23096784)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/which-cache-type-affects-shortcodes/#post-17898393)
 * 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](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/which-cache-type-affects-shortcodes/#post-17899271)
 * 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.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/which-cache-type-affects-shortcodes/#post-17899271)
 * Status: resolved