table delete
2 Topicstrouble to remove table due to ACCESS_SESSION_CLOSED event
Hi all, I want to remove a table after clicking the EdgeClient disconnect button: when ACCESS_SESSION_CLOSED { table delete -subtable TableName -all } If I use another browser session with an iRule that does check this table: when HTTP_REQUEST { log local0. [table keys -subtable TableName] } I still get all the content from this table. This looks not normal to me because I deleted this table before with the ACCESS_SESSION_CLOSED event. Does somebody know why that happens? Thank you, sm508Views0likes5Commentstable and sort order
Hi, From my simple test it seems that keys are listed (for example in foreach loop) in the order they were created so key created first is listed as last and key created as last first (at least with for indef indef keys). Is that so or maybe coincidence or flaw in my test routine? I asking this in context of deleting x number of oldest keys (when keys are indef indef). Side question is if only way to do that is to iterate through all keys and start deleting when counter hits given threshold - something like that: set s [table keys -subtable master -count] set keys_to_be_del 10 set start_del [expr {$s - $keys_to_be_del}] set i 1 foreach k [table keys -subtable master] { if {$i > $start_del} { table delete -subtable master $k } incr i } Of course above will only work correctly if my assumption is correct 🙂 Piotr246Views0likes3Comments