Static cache not caching

Hi,

I’ve set up a caching in my app here is a test url: https://dev.electives.net/img/splash/how-it-works-1.jpg it seems that the headers are set correctly, but i’m still getting a cache miss.

The file is on this path (its a mounted volume if that makes a difference)

pwd how-it-works-1.jpg
/code/public/img/splash

And here is the toml file:

[[statics]]
  guest_path = "/code/public/img"
  url_prefix = "/img"

Any ideas on why it keeps reporting a cache miss?

Ah, we don’t do normal HTTP caching (like from volumes). The [statics] are designed specifically for assets that are bundled as part of a full stack app. When you deploy an app with statics, we extract the files from the Docker image itself and handle them separately.

We’ll probably need to have HTTP caching-like-a-CDN someday. For now, the best way to solve this is to either deploy an nginx app that does caching, or put a traditional CDN in front of your app.

ohh, ok. I’m removing the folder in the docker image so I can mount the drive. It’s ok I’ll front it with nginx.