Edit this page

up.network up.cache.evict([pattern])
JavaScript function

Evicts responses in the cache.

The server may also evict cache entries by sending an X-Up-Evict-Cache header.

Example

Calling without argument will clear the entire cache:

up.cache.evict()

To only remove some cache entries, pass a URL pattern:

up.cache.evict('/users/*')

Parameters

[pattern]
optional

A URL pattern matching cache entries that should be removed.

If omitted, the entire cache is evicted.

string