Edit this page

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

Removes all cache entries.

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

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

Other reasons the cache may clear

By default Unpoly automatically clears the entire cache whenever it processes a request with an non-GET HTTP method. To customize this rule, use up.network.config.clearCache.

The server may also clear the cache by sending an X-Up-Clear-Cache header.

Parameters

[pattern] string optional

A URL pattern matching cache entries that should be cleared.

If omitted, the entire cache is cleared.

This website uses cookies to improve usability and analyze traffic.
I accept or learn more