修复定时文章功能

This commit is contained in:
tangly1024
2025-01-19 14:55:30 +08:00
parent ce44bd2663
commit 9ba0fe1b3c
2 changed files with 85 additions and 74 deletions

View File

@@ -57,7 +57,7 @@ export async function getOrSetDataWithCustomCache(
* @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 (!dataFromCache || JSON.stringify(dataFromCache) === '[]') {
return null