mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Use minutes instead of seconds for cache_expiry
This commit is contained in:
@@ -187,7 +187,7 @@ class Category extends Model
|
||||
->orderBy('count', 'desc')
|
||||
->get();
|
||||
|
||||
$expiresAt = Carbon::now()->addSeconds(config('nntmux.cache_expiry_long'));
|
||||
$expiresAt = Carbon::now()->addMinutes(config('nntmux.cache_expiry_long'));
|
||||
Cache::put('recentlyadded', $recent, $expiresAt);
|
||||
|
||||
return $recent;
|
||||
@@ -306,7 +306,7 @@ class Category extends Model
|
||||
*/
|
||||
public static function getChildren($categoryId)
|
||||
{
|
||||
$expiresAt = Carbon::now()->addSeconds(config('nntmux.cache_expiry_long'));
|
||||
$expiresAt = Carbon::now()->addMinutes(config('nntmux.cache_expiry_long'));
|
||||
$children = Cache::get(md5($categoryId));
|
||||
if ($children !== null) {
|
||||
return $children;
|
||||
@@ -358,7 +358,7 @@ class Category extends Model
|
||||
return $catIds;
|
||||
}
|
||||
$catIds = self::query()->whereIn('id', $ids)->get();
|
||||
$expiresAt = Carbon::now()->addSeconds(config('nntmux.cache_expiry_long'));
|
||||
$expiresAt = Carbon::now()->addMinutes(config('nntmux.cache_expiry_long'));
|
||||
Cache::put('categoryids', $catIds, $expiresAt);
|
||||
|
||||
return $catIds;
|
||||
@@ -444,7 +444,7 @@ class Category extends Model
|
||||
$arr = $arrsql;
|
||||
} else {
|
||||
$arr = $sql->get()->toArray();
|
||||
$expiresAt = Carbon::now()->addSeconds(config('nntmux.cache_expiry_long'));
|
||||
$expiresAt = Carbon::now()->addMinutes(config('nntmux.cache_expiry_long'));
|
||||
Cache::put(md5(implode(',', $excludedCats).implode(',', $roleExcludedCats)), $arr, $expiresAt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user