Forum Discussion
andrew_C1
Nimbostratus
Feb 16, 2016best way to touch a table key/value to refresh with specific timeout
as per title, [table lookup -subtable $sub $key] touches but sets a timeout of 180 seconds. From what i can see all other methods of refreshing will involve writing to the key/pair value which seems like a waste to me.
Is there a nice clean why to do this?
cheers
edit: right now im using table add
1 Reply
Hi Andrew,
a
wouldn't set a hardcoded[table lookup -subtable $sub $key]
value of 180 seconds. Instead it would just refresh the-timeout
value that was specified during the creation. Well, the default-timeout
value is 180 seconds. But you are able to specify an-timeout
value of your choice when using-timeout
...[table set/add/replace]You may try this rather simple demo snippet to observe the behavior of default timeouts lifetimes of table keys...
table set key1 1 table set key2 1 10 20 table set key3 1 10 indef after 5000 set data [table lookup key2] log local0.debug "Key1: Timeout = [table timeout -remaining key1], Lifetime = [table lifetime -remaining key1]" log local0.debug "Key2: Timeout = [table timeout -remaining key2], Lifetime = [table lifetime -remaining key2]" log local0.debug "Key3: Timeout = [table timeout -remaining key3], Lifetime = [table lifetime -remaining key3]"Cheers, Kai
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