ISTATS::incr

Description

Increments the specified key by the given iStats value.

Syntax

ISTATS::incr <key> <value>

ISTATS::incr

  • Increments the specified iStats key by the given value. Note that there is no default increment value, so the value is required, not optional.

Examples

when HTTP_REQUEST {
    if { [string tolower [HTTP::uri]] equals "/12345" } {
        ISTATS::incr "uri /12345 r Requests" 1
        HTTP::uri "/"
        HTTP::redirect "http://www.mysite.com"
    } elseif { [string tolower [HTTP::uri]] equals "/stats" } {
          HTTP::respond 200 content "<html><body>Requests for /12345: [ISTATS::get "uri /12345 r Requests"]</body></html>"
    }
}