From f3ba21c1409c7b93ca55f603b25df383a848acfc Mon Sep 17 00:00:00 2001 From: Luna <279187109+lunadogbot@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:44:44 +0000 Subject: [PATCH] docs: document DENO_CACHE_MAX_SIZE env var (2.8) Adds DENO_CACHE_MAX_SIZE to the special-environment-variables table. Notes the LRU-by-mtime trim behavior, the supported size suffixes (B/K/KB/M/MB/G/GB/T/TB, case-insensitive, fractional), and which subcommands trigger the trim. Refs denoland/deno#32932 --- runtime/reference/env_variables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/reference/env_variables.md b/runtime/reference/env_variables.md index 8769046bc..bf7123134 100644 --- a/runtime/reference/env_variables.md +++ b/runtime/reference/env_variables.md @@ -145,6 +145,7 @@ The Deno runtime has these special environment variables. | DENO_CERT | Load certificate authority from PEM encoded file | | DENO_COVERAGE_DIR | Set the directory for collecting coverage profile data. This option only works for [`deno test` subcommand](/runtime/reference/cli/test/). | | DENO_DIR | Set the cache directory | +| DENO_CACHE_MAX_SIZE | Trim oldest cache entries (by mtime) after cache writes whenever the Deno cache exceeds this size. Accepts size suffixes — `B`, `K`/`KB`, `M`/`MB`, `G`/`GB`, `T`/`TB` (case-insensitive, fractional values allowed, e.g. `1.5G`). Available in Deno 2.8+. | | DENO_INSTALL_ROOT | Set deno install's output directory (defaults to `$HOME/.deno/bin`) | | DENO_REPL_HISTORY | Set REPL history file path History file is disabled when the value is empty
(defaults to `$DENO_DIR/deno_history.txt`) | | DENO_NO_PACKAGE_JSON | Disables auto-resolution of `package.json` |