Understanding Smart Cache

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 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:

3g2 3gp 7z ai asf avi avif apk
bin bat bmp bz2 class css csv dat
doc docx dll dmg ejs eot eps exe
flac flv heic gif gz ico iso jar
jpg jpeg js m3u8 m4u mid midi mkv
mp3 mp4 mpa mpg odt ogg otf pdf
pict pls png ppt pptx ps psd rar
srt svg svg2 swf tar tif tiff ttf
vob webm webp woff woff2 wav wma xls
xlsx zip zst ts txt yuv    


MIME types that will not be cached:

text/html application/json application/xml  

Table of Contents

Was this article helpful?
29 out of 31 found this helpful