# Purge Cache

# usage

Usage: oredge cache purge [OPTIONS]

OPTIONS:
    --condition json                   condition, can add mutilple times.
        variable object
            name string                variable name, uri,uri-arg,uri-seg,query-string,sorted-query-string,host,req-method,req-cookie,req-header,scheme,server-port,server-addr,first-x-forwarded-addr,last-x-forwarded-addr.
            args string|integer        args.
        operator object
            name string                operator name, eq,ne,lt,le,gt,ge,contains,contains-word,prefix,suffix,!contains,!contains-word,!prefix,!suffix.
        values array
            type string                str or rx or wc. 
            value string               value. 
        caseless bool                  is caseless, true or false.
    --url string                       url, can add mutilple times.
    --http string                      http application id.
    --type string                      urls(default) or conditional.
    --note string                      note.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --config                           specify config file, default is ~/.oredge/config.

# example

  1. purge cache.
# oredge cache purge --type urls --http 22 --url http://www.test.com:80/a/b
ID: 1
  1. purge cache with conditional type
[root@localhost bin]# ./oredge cache purge --type conditional --condition '{"variable":{"name":"uri"},"operator":{"name":"prefix"},"values":[{"type":"str","val":"/a/b"}],"caseless":false}' --http 1
ID: 1