How to modify HTTP cache folder
Hello, I'm using Astro framework with Deno and Directus, but after a while of the website running on my server, I get a
deno_cache
folder very big, weighting more than 10 Go.
My server has a specific folder where it's allowed to have big folders but I need to change it instead of using the default folder Deno is using.
From what I've seen in Deno code it's hardwritten here but I'm unsure, I do not know rust at all and just followed how the variable is used.GitHub
deno/cli/worker.rs at main · denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
2 Replies
You can change the cache directory with the
DENO_DIR
environment variable. See https://docs.deno.com/runtime/manual/basics/env_variables#special-environment-variables for more info.Environment variables | Deno Docs
There are a few ways to use environment variables in Deno:
It's not the same cache
In my environment my
DENO_DIR
is set to a different value than this folder
Also the folder is named deno_cache