chengjie 4 ay önce
ebeveyn
işleme
b82cb39b1c
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      src/api/yjbdc/yjbdcController.js

+ 5 - 2
src/api/yjbdc/yjbdcController.js

@@ -348,10 +348,13 @@ export async function GetYJBDCArticleList(ctx) {
348 348
         ID:ctx.query.ID || 0,
349 349
         IsChoiceness:ctx.query.IsChoiceness || 0,//是否是精选文章
350 350
         IsTodayCount: ctx.query.IsTodayCount || false,
351
+        IsNew: ctx.query.IsNew || 0,
351 352
     };
352 353
     // 尝试从缓存获取
353 354
     const url='GetYJBDCArticleList?IsChoiceness='+param.IsChoiceness+'&UserID='+param.UserID+'&ID='+param.ID;
354 355
     let result = globalCache.get(url);
356
+    if (param.IsNew==1)
357
+        result=0;
355 358
     if (result === 0) {
356 359
 
357 360
         result = await yjbdc.GetYJBDCArticleList(param);
@@ -377,8 +380,8 @@ export async function GetYJBDCArticleList(ctx) {
377 380
             }
378 381
         }
379 382
         
380
-        globalCache.set(url, result, config.BufferMemoryTimeLow);
381
-        console.log("缓存60秒");
383
+        globalCache.set(url, result, config.BufferMemoryTime);
384
+        console.log("缓存"+config.BufferMemoryTime+"秒");
382 385
     }
383 386
 
384 387