Response Filesystem Cache¶
Stores anonymous responses for registered paths as files and serves repeat requests from those files instead of running the route. Cache tags decide when a file stops being served.
For Drupal 10.6, 11.3+ and 12
products:
path_prefix: /api/products
query_allowlist:
- category
- page
What it does¶
A module registers a path prefix. The first anonymous
request for a path under it runs the route as usual, and the response is
written to a file beneath
public://response_filesystem_cache/.
Later anonymous requests for the same path, host, language and allowed query
are answered from that file until one of the response's cache tags is
invalidated, its max-age passes, or the cache is rebuilt.
It is for read-only endpoints, such as JSON APIs, whose responses are the same for every anonymous visitor and are costly to build. Signed-in visitors always get the live route. Requests still boot Drupal; the cache saves the route's work, not the bootstrap.

Site administrators can turn each registered mapping off at Configuration > Development > Response Filesystem Cache.