Title: Generate Cache based on Session variable
Last modified: August 17, 2023

---

# Generate Cache based on Session variable

 *  Resolved [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/)
 * Hi,
 * I need a session variable that sets the tax rate of the website visitors and 
   thus also changes the output of the website.
   So I need to generate and output
   the cache based on the value the user has in this session variable.
 * For example every page is cached 12 times for the different values of the session
   variable “DE”, “US”, “GB”, etc.. when a user has the value “DE” in the session
   variable the DE version should be displayed and so on.
 * Is this possible?
 * I am able to avoid the cache by using get parameters for the tax rate but I don’t
   want to use this approach, it should not happen depending on get parameters.
 * Thank you in advance for your response.

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

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980498)
 * no, sorry. it is not possible.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980536)
 * Can we request such feature if we buy premium or anything else?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980597)
 * you can disable cache if you set a cookie.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980666)
 * is there any other way how we can cache multiple versions and display the right
   version depending on what tax rate they selected? the tax rate doesn’t have to
   be stored in a session, if there is another way it can also be handled that way
 * I just need different cache versions of the same site depending on the tax rate,
   every version must be cached
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980675)
 * the country must be checked by Ajax instead of PHP.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980732)
 * so i should alter the prices on the page via javascript?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980873)
 * you cannot do it. the plugin owner should do it.

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

The topic ‘Generate Cache based on Session variable’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/generate-cache-based-on-session-variable/#post-16980873)
 * Status: resolved