Skip to main content
The file cache keeps file content Mirage has read, so a second read is served without asking the backend again. limit is in bytes or a size string. max_drain_bytes is the largest file a streamed read copies into the cache: 8 MiB or limit, whichever is smaller, and never more than limit. The key is cache, beside store rather than inside it.

In memory

On Redis

With the cache on Redis, a file one instance of the workspace read is served to the others without asking the backend again.
The keys belong to the workspace, so two workspaces on one Redis never read each other’s files. Naming the same key_prefix in several workspaces shares one cache between them, which is safe only when they mount the same backends at the same paths. On Redis, limit does not evict anything; cap the server’s memory with maxmemory instead.