Showing
1 changed file
with
1 additions
and
5 deletions
@@ -44,11 +44,7 @@ class LivingController extends BaseController | @@ -44,11 +44,7 @@ class LivingController extends BaseController | ||
44 | ->createCommand('SELECT MAX(update_time),count(*) FROM {{%room}} WHERE best!="0" AND find_in_set(:app,app)') | 44 | ->createCommand('SELECT MAX(update_time),count(*) FROM {{%room}} WHERE best!="0" AND find_in_set(:app,app)') |
45 | ->bindValue(':app', $this->app) | 45 | ->bindValue(':app', $this->app) |
46 | ->getRawSql()]); | 46 | ->getRawSql()]); |
47 | - $this->cache->set($key, json_encode($ret), Yii::$app->params['defaultCacheExpire'], $dependency); | ||
48 | - } | ||
49 | - | ||
50 | - if (is_string($ret)){ | ||
51 | - $ret = json_decode($ret,true); | 47 | + $this->cache->set($key, $ret, Yii::$app->params['defaultCacheExpire'], $dependency); |
52 | } | 48 | } |
53 | 49 | ||
54 | $ret = array_values(array_filter($ret,function($row){ | 50 | $ret = array_values(array_filter($ret,function($row){ |
-
Please register or login to post a comment