Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加缓存Cache 能力 #45

Open
heimanba opened this issue Dec 14, 2022 · 0 comments
Open

增加缓存Cache 能力 #45

heimanba opened this issue Dec 14, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@heimanba
Copy link
Member

heimanba commented Dec 14, 2022

全局缓存

作为项目级别存储:
image
实际存储NAS路径 为: /mnt/auto/cache

项目级别缓存

  • 自定义模式
cache:
    paths: 
	- ./node-modules
    	- ./public
    key: npm-${{ hashFiles('package-lock.json') }}

问题1: 如何存储数据
./node-modules./public 分别存入 /mnt/auto/${appName}/${key} 文件下
问题2: 什么时机进行数据存储
识别如果是 cache的步骤, onComplete 添加默认 存储的步骤
问题3: 缓存什么时候生效
默认在onInit 阶段生效
问题4: 缓存如何生效?
默认以软链形式进行生效,格式为 ln -s /mnt/auto/${appName}/${key}/node-modules node-modules
问题5: 软链冲突如何解决?
假设已经存在了 node_modules,如何处理冲突?

  • 简单模式
cache:
  npm: true 

等于=>

cache:
    paths: 
	- ./node-modules
     key: npm-${{ hashFiles('package-lock.json') }}

@heimanba heimanba added the enhancement New feature or request label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants