这是indexloc提供的服务,不要输入任何密码
Skip to content

Changing and Disabling Deno's cache directory #15067

@PureOcean

Description

@PureOcean

Checklist

  • I'm requesting a feature unrelated to a specific site
  • I've looked through the README
  • I've verified that I have updated yt-dlp to nightly or master (update instructions)
  • I've searched the bugtracker for similar requests including closed ones. DO NOT post duplicates
  • I've read the policy against AI/LLM contributions and understand I may be blocked from the repository if it is violated

Provide a description that is worded well enough to be understood

Deno's default cache directory is %LocalAppData%\Deno in Windows. Can be changed to a different directory using two environment variables:

XDG_CACHE_HOME - Cache files are created in a deno folder within the specified directory.
Usage: set XDG_CACHE_HOME=D:\DenoCache - Result: D:\DenoCache\deno

DENO_DIR - Cache files are created directly in the specified folder.
Usage: set DENO_DIR=D:\DenoCache- Result: Files, "D:\DenoCache\node_analysis_cache_v2*", "D:\DenoCache\dep_analysis_cache_v2*" and empty a folder: npm

For now, yt-dlp runs deno as follows:

deno run --ext=js --no-code-cache --no-prompt --no-remote --no-lock --node-modules-dir=none --no-config --no-npm --cached-only -

I discovered a way to avoid creating the Deno cache directory.

set DENO_DIR=nul

Of course, this method can be cause problems in different situations. Need to test. If the results are positive, may consider adding it to --no-cache-dir (or add new option --no-cache-dir-extjs like).

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions