darkweak / souin

An HTTP cache system, RFC compliant, compatible with @tyktechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @go-kratos, @gin-gonic, @roadrunner-server, @zalando, @zeromicro, @nginx and @apache

Home Page:https://docs.souin.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filesystem based cache

dkarlovi opened this issue · comments

Nginx provides a filesystem+memory hybrid cache which is useful for serving largeish static files.

This would be a nice addition here because it fits nicely with Kubernetes emptyDir type volume which allows a pod to get a temporary writable filesystem mount which is alive as long as the pod is alive. It would mean it could locally store and serve large-ish files without polluting memory and the distributed store (like Redis) with it, and the cache not persisting a reboot is not a big deal.

Hello, you could use the nuts storage provider that supports the filesystem stored data IMHO.

@darkweak ah interesting, would you mind creating a minimal example of that, maybe we could add it to the docs? I'd imagine it would be a common pattern for this specific use case. I did go through their docs about it, but seem to have missed it.

I can see it's already documented such as

        nuts {
            path /tmp
        }

I've checked why it doesn't work for me and it's actually because of #345 which is unrelated, closing here.