Forum Discussion
kendalladkins_5
Nov 09, 2007Nimbostratus
Variable Scope & Lifetime
I am relatively new to iRule development and I need a little help understanding variable scope. My main objective is to understand how I pass values from the HTTP_REQUEST event to the HTTP_RESPONSE ev...
Deb_Allen_18
Feb 22, 2008Historic F5 Account
That's correct, global variables are not shared across TMMs, rather 1 is maintained per TMM, separately.
From PD:
Each TMM has it's own copy of the global variables.... That's why we added logic to the Tcl syntax checker to detect the use of globals and disable CMP for any virtuals that are using iRules that use global variables. However, the detection logic certainly isn't foolproof and if someone has disabled syntax checking or otherwise obfuscated their use of global variables, then we won't detect them and thus not disable CMP.This limitation will be removed in an upcoming release. Until then, the best way to share global data between TMMs is to store it in the session table using the session command: (Click here)
HTH
/deb
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects