mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
log is announce cache
This commit is contained in:
@@ -573,9 +573,9 @@ class TrackerRepository extends BaseRepository
|
||||
$lockKeyOriginal = str_replace($key, '', $queryString);
|
||||
$lockKey = md5($lockKeyOriginal);
|
||||
$startTimestamp = nexus()->getStartTimestamp();
|
||||
do_log("key: $key, queryString: $queryString, lockKeyOriginal: $lockKeyOriginal, startTimestamp: $startTimestamp");
|
||||
$redis = Redis::connection()->client();
|
||||
$cache = $redis->get($lockKey);
|
||||
do_log("key: $key, queryString: $queryString, lockKeyOriginal: $lockKeyOriginal, startTimestamp: $startTimestamp, cache: $cache");
|
||||
if ($cache === false) {
|
||||
//new request
|
||||
$redis->set($lockKey, $startTimestamp, ['ex' => self::MIN_ANNOUNCE_WAIT_SECOND]);
|
||||
|
||||
Reference in New Issue
Block a user