Explorar o código

:fire: redis 有效期

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
b38228b4b4
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Console/Commands/UpgradeDictDefaultMeaning.php

+ 2 - 2
app/Console/Commands/UpgradeDictDefaultMeaning.php

@@ -111,7 +111,7 @@ class UpgradeDictDefaultMeaning extends Command
                                 ->select('word','note')
                                 ->cursor() as $word) {
                 if(!empty($word['note'])){
-                    RedisClusters::put("dict_first_mean/{$thisLang}/{$word['word']}", mb_substr($word['note'],0,50,"UTF-8") ,30*24*3600);
+                    RedisClusters::put("dict_first_mean/{$thisLang}/{$word['word']}", mb_substr($word['note'],0,50,"UTF-8"));
                 }
                 $bar->advance();
             }
@@ -130,7 +130,7 @@ class UpgradeDictDefaultMeaning extends Command
                             if(!empty($_word) && $word['word'] === $_word ){
                                 Log::info($cacheKey.':'.$cacheValue);
                             }
-                            RedisClusters::put($cacheKey, $cacheValue ,30*24*3600);
+                            RedisClusters::put($cacheKey, $cacheValue);
                         }
 
                         if($count % 1000 === 0){