Title: Exclude a variable from cache
Last modified: January 6, 2022

---

# Exclude a variable from cache

 *  Resolved [macsi](https://wordpress.org/support/users/macsi/)
 * (@macsi)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exclude-a-variable-from-cache/)
 * Hi,
 * We use LS Cache and have an issue because some variables remains in cache and
   then, our form needs a new nonce….
 * In order to include the whole variables set in our plugin thru the WP backoffice,
   in a JS file, we use the following WP function :
 * => wp_localize_script( ‘totum-addon-give-front’, ‘aj’, $aj );
 * The matter is that the variable $aj which contains all parameters, in to updated
   and remains in cache. Then, we ask for another nonce and the website reload endlessly:(((
 * We exluded the JS file from the cache, but nothing better.
 * Please, how could we do to prevent LS plugin from caching the $aj variable ?
 * Thanks a lot
    Gil

Viewing 1 replies (of 1 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/exclude-a-variable-from-cache/#post-15226943)
 * Hi,
 * please check this [page](https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url)
 * best regards,

Viewing 1 replies (of 1 total)

The topic ‘Exclude a variable from cache’ is closed to new replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/exclude-a-variable-from-cache/#post-15226943)
 * Status: resolved