We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/klever1988/cachewrtbuild/blob/4e49fc2aa43955b2933541b0372f7416f7dac23d/fetch.js#L18-L19 由于 restoreKeys = ['cache-openwrt'] 或 restoreKeys = ['cache-openwrt', 'cache-openwrt-<commithash>'] 下面再查缓存的时候 https://github.com/klever1988/cachewrtbuild/blob/4e49fc2aa43955b2933541b0372f7416f7dac23d/fetch.js#L40 keyString 包含时间戳,肯定不会命中,所以会用 restoreKeys 依次去查 但是因为缓存的 key = cache-openwrt-<commithash>-<timestamp> 所以 restoreKeys 中的 cache-openwrt 一定会命中缓存 也就是说不管工具链的commithash有没有发生变化,只要缓存存在就一定会命中,那这个还有什么意义呢?
restoreKeys = ['cache-openwrt']
restoreKeys = ['cache-openwrt', 'cache-openwrt-<commithash>']
keyString
restoreKeys
key = cache-openwrt-<commithash>-<timestamp>
cache-openwrt
建议将 restoreKeys 只添加一个 restoreKeys = ['cache-openwrt-<commithash>'] 这样可以根据工具链的 commithash 去命中缓存
restoreKeys = ['cache-openwrt-<commithash>']
The text was updated successfully, but these errors were encountered:
命中了缓存不影响源文件出现变动、也会重新编译变动的那部分呀。 keyString 其实主要还是更新缓存用的,比如如果不用ccache,那么keyString就不会加一个时间戳,多次编译时这个keyString没有变化,Post cache这一步就会自动跳过更新缓存。
Sorry, something went wrong.
感谢答疑,还有一个问题,GitHub Action 的缓存是每个仓库5G还是一个人一共5G
应该是账号5g
No branches or pull requests
https://github.com/klever1988/cachewrtbuild/blob/4e49fc2aa43955b2933541b0372f7416f7dac23d/fetch.js#L18-L19
由于
restoreKeys = ['cache-openwrt']
或restoreKeys = ['cache-openwrt', 'cache-openwrt-<commithash>']
下面再查缓存的时候
https://github.com/klever1988/cachewrtbuild/blob/4e49fc2aa43955b2933541b0372f7416f7dac23d/fetch.js#L40
keyString
包含时间戳,肯定不会命中,所以会用restoreKeys
依次去查但是因为缓存的
key = cache-openwrt-<commithash>-<timestamp>
所以
restoreKeys
中的cache-openwrt
一定会命中缓存也就是说不管工具链的commithash有没有发生变化,只要缓存存在就一定会命中,那这个还有什么意义呢?
建议将 restoreKeys 只添加一个
restoreKeys = ['cache-openwrt-<commithash>']
这样可以根据工具链的 commithash 去命中缓存The text was updated successfully, but these errors were encountered: