static variable
1 TopicThe same static variable in different iRules/VS
Hi, I have a static variable set in iRule named rule-http: when RULE_INIT { set static::variable "first_value" } This iRule rule-http is applied to virtual server VS-1 (1.2.3.4:80) - used in production very often I prepared second iRule named rule-http-new, with the same variable name set to a different value: when RULE_INIT { set static::variable "second_value" } and applied it to VS-2 (1.2.3.5:80) - it will be used in the future, now only tested couple of times, not processing much data I assumed that when client request hits VS-1, rule-http is processed and regardless of the previous value, the static::variable is set to "first_value". And that the last set value will remain in the system until next change or reload. Or Am I wrong? Because in real, the value of static::variable remains set to "second_value" and other events of the iRule rule-http are not processed as expected. ver. 17.5.1.3 Thank you for clarification.Solved59Views0likes3Comments