PROXY:shared_table_delete(table_name, key)
Deletes an entry specified by a key from the shared table. If the key does not exist, the function will do nothing. If there is more than one process attached to the data entry, this function only detaches the calling process.
This function will fail if the table has not been created yet; it will not trigger the creation of a new table.
Returns Boolean true if successful, otherwise, returns Boolean false.
Syntax
PROXY:shared_table_delete(table_name, key);
Arguments
| Name | Description |
|---|---|
| table_name |
A Lua string as the name of the shared table. This is the unique identification of a shared table. This parameter is mandatory. The maximum length of this table name is 255. |
|
key |
The key can be a Lua string or integer. This parameter is mandatory. The maximum length for the string is 255. |
Events
All events except: PERSISTENCE, POST_PERSIST, CLIENTSSL_HANDSHAKE.
Example
when HTTP_REQUEST {
table_name = "TableDemo1"
key3 ="keyString103"
ret = PROXY:shared_table_delete(table_name,key3)
if ret then
debug("===>>shared_table_delete success for key: [Table:%s] [%s]\n", table_name, key3)
else
debug("===>>shared_table_delete failed for key: [Table:%s] [%s]\n", table_name, key3)
end
}
Supported Version
FortiADC version 7.4.2 and later.