Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

andrew_C1's avatar
andrew_C1
Icon for Nimbostratus rankNimbostratus
Feb 16, 2016

best 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

    [table lookup -subtable $sub $key]
    wouldn't set a hardcoded
    -timeout
    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
    [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