denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.66k stars 5.25k forks source link

question: Where is the web cache storage persisted to disk? #25204

Closed jsejcksn closed 1 month ago

jsejcksn commented 1 month ago

Can anyone provide information about where the cache storage is persisted to disk? I thought it was in origin storage (e.g. $DENO_DIR/location_data), but I don't see new entries being created after the creation of new cache entries in modules that resolve to different origin keys. Conversely, when I use the web storage or KV APIs in those same modules, I do see new entries in the origin storage directory…

/cc @bartlomieju because you recommended that I ask this here

satyarohith commented 1 month ago

Hi @jsejcksn. It's currently stored under "deno_cache" in the temp directory https://github.com/denoland/deno/blob/2bb013f9baa927fc7b392766b0182b91380b9aa8/cli/worker.rs#L764-L766