clear

This command deletes documents from the document cache.

Syntax

clear [URL-match] [on | off] [cache-key]

Parameters

URL-match
Specifies the shell-style regular expression that identifies documents in the document cache. The default value is *, which matches all entries.
on
Indicates that matching documents are marked as expired.
off
Indicates that matching documents are deleted, which is the default behavior.
URL-match
Specifies the shell-style regular expression that identifies documents in the document cache. The default value is *, which matches all entries.
cache-key
Specifies the exact match for the cache key to restrict the URL match to only documents with this cache key. This parameter is valid only when you include the URL-match parameter. The default value is *, which ignores the cache key.

Guidelines

The clear command deletes or marks as expired all or specified documents from the document cache. When specified without parameters, all documents are deleted.

If you need to delete documents that include brackets, you must escape these characters with two backward slashes. For example, use \\[abc\\] to match [abc].

Examples

  • Delete all documents from the document cache.
    # clear
    Document cache : cleared documents matching the '*' pattern and the '*' cache key
    # cancel
  • Deletes all GIF documents from the document cache.
    clear *.gif
    Document cache : cleared documents matching the '*.gif' pattern and the '*' cache key
    # cancel
  • Marks all GIF documents in the document cache as expired.
    # clear *.gif on
    Document cache : Invalidated documents in the document cache that match the '*.gif' pattern 
    and the '*' cache key
    # cancel
  • Delete all GIF documents in the document cache with the key1 cache key.
    clear *.gif off key1
    Document cache : cleared documents matching the '*.gif' pattern and the 'key1' cache key
    # cancel