Edit this page

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

Expires entries in the cache.

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


The server may also expire cache entries by sending an X-Up-Expire-Cache header.

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


[pattern] string optional

A URL pattern matching cache entries that should be expire.

If omitted, the entire cache is expired.