Skip to content

cache

Set cache headers for the response.

Rule Syntax

txt
pattern cache://value [filters...]
ParametersDescriptionDetailed Documentation
patternAn expression to match the request URLMatch Pattern Documentation
valueNumber of seconds to cache, no, no-cache, no-store
• Inline/embedded/Values content
⚠️ Loading data from files/remote URLs is not supported
filtersOptional filters, supporting matching:
• Request URL/Method/Header/Content
• Response Status Code/Header
Filter Documentation

Affected Response Headers: cache-control/expires/pragma

Configuration Example

txt
# Set response headers to not cache
www.example.com/path cache://no

# Set a 60-second cache response header.
www.example.com/path cache://60
  1. Disable caching: Remove cache-related fields from request headers and set the response header to no cache. For more information, see disable://cache.