8000 新增syncMode为none时的缓存依赖功能 · Issue #366 · cnpm/cnpmcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
新增syncMode为none时的缓存依赖功能 #366
Closed
@hezhengxu2018

Description

@hezhengxu2018

基础的需求是对标Verdaccio代理时缓存依赖或者Nexus代理仓库缓存的功能。

即不会创建定时任务去同步依赖,在当前仓库依赖找不到,重定向到上游仓库时对包的信息做缓存,下次访问时不会再出现找不到依赖重定向的情况。由于没有创建同步任务,仓库的存储压力与网络带宽的压力也会大大减少。对于中小型公司来说不会用到整个npm仓库的依赖也不需要同步某个依赖的所有版本,相对于allexist模式来说开启缓存的none会是更好的选择。相对于 #335 syncByInstall 功能来说是一种更懒的模式。

计划在config文件中新增cacheWhenInstall选项,仅在syncModenone时生效。如果有更符合直觉理解的配置项或者可以合并的模式可以讨论。

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

      0