Authored by wuxiao

缩短获取回放弹幕接口的缓存更新依赖语句

... ... @@ -408,7 +408,7 @@ class LivingController extends BaseController
$ret[$k] = $_row;
}
$dependency = new \yii\caching\DbDependency(['sql' => 'SELECT COUNT(*) FROM '.LiveComment::tableName($room_id)." WHERE room_id={$room_id} AND create_time>={$startTime} AND create_time<={$endTime}"]);
$dependency = new \yii\caching\DbDependency(['sql' => 'SELECT COUNT(*) FROM '.LiveComment::tableName($room_id)." WHERE room_id={$room_id} AND create_time<={$endTime}"]);
$this->cache->set($key, json_encode($ret), Yii::$app->params['defaultCacheExpire'], $dependency);
}
... ...