By default, bunny.net will cache all resources returned by the origin server that contain cacheable headers such as Cache-Control or Expires. In case of server misconfiguration, this can result in incorrect caching of sensitive or personal information.
How does Smart Cache work?
Smart Cache solves this by only caching responses with specific extensions and MIME types. This means dynamic content is not cached and will always be proxied to the origin server. If the request is cacheable by Smart Cache, the standard Cache Expiration Time setting logic applies to determine the caching time.
How do I enable Smart Cache?
To enable Smart Cache, open your Pull Zone settings. Then, click on the Caching settings in the Pull Zone menu. There, you can enable or disable the Smart Cache setting by clicking on the Smart Cache checkbox at the top of the page. This will enable Smart Cache for you.
For Pull Zones that are accelerated by DNS, Smart Cache is already enabled by default.
How to override Smart Cache?
To override smart cache, the Override Cache Time Edge Rule can be set up. This will override the decision created by the Smart Cache system and allows you to cache otherwise uncacheable extension or MIME type.
List of cacheable extensions:
MIME types that will not be cached: