diff --git a/Blacklight/Movie.php b/Blacklight/Movie.php index db5f96a36..98513ae1a 100755 --- a/Blacklight/Movie.php +++ b/Blacklight/Movie.php @@ -261,7 +261,7 @@ class Movie $catsrch = Category::getCategorySearch($cat); } $order = $this->getMovieOrder($orderBy); - $expiresAt = now()->addSeconds(config('nntmux.cache_expiry_medium')); + $expiresAt = now()->addMinutes(config('nntmux.cache_expiry_medium')); $moviesSql = sprintf( " diff --git a/Changelog b/Changelog index a09087e45..5176e9f53 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-11-21 DariusIII + * Fix: Fix bad movie caching * Chg: Update config/permission.php * Chg: Update used libraries to their latest versions * Chg: Update laravel/framework to version 5.7.14 diff --git a/app/Http/Controllers/MovieController.php b/app/Http/Controllers/MovieController.php index 8fbe0b315..459537a7d 100644 --- a/app/Http/Controllers/MovieController.php +++ b/app/Http/Controllers/MovieController.php @@ -79,8 +79,7 @@ class MovieController extends BasePageController $category = $request->has('imdb') ? -1 : Category::MOVIE_ROOT; if ($id && \in_array($id, array_pluck($mtmp, 'title'), false)) { $cat = Category::query() - ->where('title', $id) - ->where('parentid', '=', Category::MOVIE_ROOT) + ->where(['title'=> $id, 'parentid' => Category::MOVIE_ROOT]) ->first(['id']); $category = $cat !== null ? $cat['id'] : Category::MOVIE_ROOT; } diff --git a/config/nntmux.php b/config/nntmux.php index 483d7fb77..5f4ebe0ac 100644 --- a/config/nntmux.php +++ b/config/nntmux.php @@ -10,7 +10,7 @@ return [ 'echocli' => env('ECHOCLI', true), 'rename_par2' => env('RENAME_PAR2', true), 'rename_music_mediainfo' => env('RENAME_MUSIC_MEDIAINFO', true), - 'cache_expiry_short' => env('CACHE_EXPIRY_SHORT', 300), - 'cache_expiry_medium' =>env('CACHE_EXPIRY_MEDIUM', 600), - 'cache_expiry_long' => env('CACHE_EXPIRY_LONG', 900), + 'cache_expiry_short' => env('CACHE_EXPIRY_SHORT', 5), + 'cache_expiry_medium' =>env('CACHE_EXPIRY_MEDIUM', 10), + 'cache_expiry_long' => env('CACHE_EXPIRY_LONG', 15), ];