最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

caching - how to use @actionscache - Stack Overflow

programmeradmin5浏览0评论

I have a JavaScript file that I want to execute manually to get/save cache it looks like that.

import { restoreCache, saveCache } from '@actions/cache';

const cachePathes = ['dist'];

const key = getHashKey();
const prodCache = await restoreCache(cachePathes, key);
if (!prodCache) {
  execSync('npm run build');
  await saveCache(cachePathes, prodHash);
}

but I always get these warnings

Warning: Failed to restore: getCacheEntry failed: Cache Service Url not found, unable to restore cache.

Warning: Failed to save: reserveCache failed: Cache Service Url not found, unable to restore cache.

发布评论

评论列表(0)

  1. 暂无评论