mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
GlobalJS,GlobalStyle
This commit is contained in:
4
lib/cache/cache_manager.js
vendored
4
lib/cache/cache_manager.js
vendored
@@ -9,7 +9,7 @@ import BLOG from '@/blog.config'
|
||||
* @returns
|
||||
*/
|
||||
export async function getDataFromCache(key, force) {
|
||||
if (BLOG.ENABLE_CACHE || force) {
|
||||
if (JSON.parse(BLOG.ENABLE_CACHE) || force) {
|
||||
const dataFromCache = await getApi().getCache(key)
|
||||
if (JSON.stringify(dataFromCache) === '[]') {
|
||||
return null
|
||||
@@ -28,7 +28,7 @@ export async function setDataToCache(key, data) {
|
||||
}
|
||||
|
||||
export async function delCacheData(key) {
|
||||
if (!BLOG.ENABLE_CACHE) {
|
||||
if (!JSON.parse(BLOG.ENABLE_CACHE)) {
|
||||
return
|
||||
}
|
||||
await getApi().delCache(key)
|
||||
|
||||
Reference in New Issue
Block a user