# Purge Cache

# usage

Usage: oredge cache purge [http] [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 integer                     http application id.
    --type string                      urls(default) or conditional.
    --note string                      note.

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

# example

we can use --http to specify http or specify http id directly.

  1. purge cache.
# oredge cache purge 887 --url "http://test.label.com/a/b"
ID: 887-84
  1. purge cache with conditional type
# oredge cache purge 887 --type conditional --condition '{"variable":{"name":"uri"},"operator":{"name":"prefix"},"values":[{"type":"str","val":"/a/b"}],"caseless":false}'
ID: 887-85