mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 02:20:54 +08:00
isReAnnounce cache add prefix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.2');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-04-29');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-04-30');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
+3
-3
@@ -157,8 +157,8 @@ if (
|
||||
&& isset($torrent['price'])
|
||||
&& $torrent['price'] > 0
|
||||
&& $torrent['owner'] != $userid
|
||||
&& get_setting("torrent.paid_torrent_enabled") == "yes")
|
||||
{
|
||||
&& get_setting("torrent.paid_torrent_enabled") == "yes"
|
||||
) {
|
||||
$hasBuy = \App\Models\TorrentBuyLog::query()->where('uid', $userid)->where('torrent_id', $torrent['id'])->exists();
|
||||
if (!$hasBuy) {
|
||||
if ($az['seedbonus'] < $torrent['price']) {
|
||||
@@ -222,7 +222,7 @@ foreach(['info_hash', 'passkey', 'peer_id'] as $lockField) {
|
||||
$lockParams[$lockField] = $_GET[$lockField];
|
||||
}
|
||||
$lockString = http_build_query($lockParams);
|
||||
$lockKey = md5($lockString);
|
||||
$lockKey = "isReAnnounce:" . md5($lockString);
|
||||
$log .= ", [CHECK_RE_ANNOUNCE], lockString: $lockString, lockKey: $lockKey";
|
||||
$redis = $Cache->getRedis();
|
||||
if (!$redis->set($lockKey, TIMENOW, ['nx', 'ex' => 5])) {
|
||||
|
||||
Reference in New Issue
Block a user