forked from denoland/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# `deno cache` | ||
|
||
**Purpose:** Pre-download and compile remote dependencies along with their | ||
static imports, storing them in the local cache. | ||
|
||
**Usage:** | ||
|
||
- Cache a specific module and its dependencies without executing any code: | ||
``` | ||
deno cache https://deno.land/std/http/file_server.ts | ||
deno cache npm:express | ||
``` | ||
|
||
**Behavior:** | ||
|
||
- Modules cached using `deno cache` are stored in `$DENO_DIR`, a centralized | ||
directory. Its location varies by OS. For instance, on macOS, it's typically | ||
`/Users/ry/Library/Caches/deno`. You can see the location by running `deno info` with no arguments. | ||
- Subsequent executions of cached modules don't require downloads or | ||
compilation, unless `--reload` is used to force updates. | ||
|
||
This ensures faster execution times for scripts that have already been cached, | ||
by avoiding unnecessary network requests and recompilation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters