Forum Discussion

ashbeyk_127079's avatar
ashbeyk_127079
Icon for Nimbostratus rankNimbostratus
Sep 15, 2005

Array not clearing after rule updated

I have the following lines as part of an iRule RULE_INIT section:

 

 

when RULE_INIT {

 

 

array set ::source_url_to_app {

 

/app1 app1

 

/app2 app2

 

/app3app3

 

}

 

 

set ::mappings [lsort -decreasing [array names ::source_url_to_app]]

 

log local0. "Available mappings: $::mappings"

 

 

}

 

 

This produces the following in the log:

 

 

Available mappings: /app3 /app2 /app1

 

 

If I now change

 

 

array set ::source_url_to_app {

 

to

 

array set ::newname {

 

 

and "Update" the rule I still see the following in the log:

 

 

Available mappings: /app3 /app2 /app1

 

 

Although the rule is being re-initialized the old array still appears to be available.

 

Is this expected behaviour?