Fortinet white logo
Fortinet white logo

Script Reference Guide

PROXY:init_stick_tbl_timeout(int)

PROXY:init_stick_tbl_timeout(int)

Sets the timeout of the stick table.

Syntax

PROXY:init_stick_tbl_timeout(init);

Arguments

Name Description

int

A positive integer that specifies the timeout.

Events

Applicable in RULE_INIT.

Example

when RULE_INIT{
    env={}
    PROXY:init_stick_tbl_timeout(500)
}
when PERSISTENCE{
    cip = HTTP:client_addr()
    hash_str_cip = sha512_hex(cip)
    
  debug("-----save_tbl-----\n")
    t={}
    t["operation"] = "save_tbl"
    t["hash_value"] = hash_str_cip
    t["srv_name"] = "pool1-3"
    ret = HTTP:persist(t)
    if ret then
	    debug("hash save table success\n");
	else
	    debug("save table failed\n");
	end
}
Output:
	Return True: success, False: failed

Supported Version

FortiADC version 5.4.x and later.

PROXY:init_stick_tbl_timeout(int)

PROXY:init_stick_tbl_timeout(int)

Sets the timeout of the stick table.

Syntax

PROXY:init_stick_tbl_timeout(init);

Arguments

Name Description

int

A positive integer that specifies the timeout.

Events

Applicable in RULE_INIT.

Example

when RULE_INIT{
    env={}
    PROXY:init_stick_tbl_timeout(500)
}
when PERSISTENCE{
    cip = HTTP:client_addr()
    hash_str_cip = sha512_hex(cip)
    
  debug("-----save_tbl-----\n")
    t={}
    t["operation"] = "save_tbl"
    t["hash_value"] = hash_str_cip
    t["srv_name"] = "pool1-3"
    ret = HTTP:persist(t)
    if ret then
	    debug("hash save table success\n");
	else
	    debug("save table failed\n");
	end
}
Output:
	Return True: success, False: failed

Supported Version

FortiADC version 5.4.x and later.