Skip to content
Permalink
Browse files

fix: cannot save cache properly

  • Loading branch information...
ulivz committed Feb 7, 2019
1 parent bcb9be7 commit 4b2127735f0190f0fa0c5c5ac2a8bd08d0e2f929
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/yuque.js
@@ -36,9 +36,10 @@ module.exports = class Yuque {
const key = hash(url + JSON.stringify(options))
const cacheKey = `fetch.${key}`
let yuque

if (!isProduction && repoId && useCache && !SKIP_CACHE) {
if (repoId) {
yuque = Yuque.getInstance()
}
if (yuque && !isProduction && useCache && !SKIP_CACHE) {
const cached = yuque.store.get(cacheKey)
if (cached) {
debug(`Using cache for ${chalk.yellow(url)}`)

0 comments on commit 4b21277

Please sign in to comment.
You can’t perform that action at this time.