diff --git a/.env.local b/.env.local index f0818e9..d35c3be 100644 --- a/.env.local +++ b/.env.local @@ -1,9 +1,9 @@ APP_NAME=123movies APP_ENV=local APP_KEY=base64:c+t+ur1YkrxRCrN4AVKv/NntmB+UShx1y/iSw4d3KmM= -APP_DEBUG=true +APP_DEBUG=false APP_URL=https://playlab.test - +DEBUGBAR_ENABLED=false LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug @@ -26,9 +26,9 @@ SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 -REDIS_HOST=127.0.0.1 +REDIS_HOST=/var/lib/redis/redis.sock REDIS_PASSWORD=null -REDIS_PORT=6379 +REDIS_PORT=-1 MAIL_MAILER=smtp MAIL_HOST=mailhog diff --git a/app/Services/TmdbClient.php b/app/Services/TmdbClient.php index 9266bf7..669921a 100644 --- a/app/Services/TmdbClient.php +++ b/app/Services/TmdbClient.php @@ -8,6 +8,7 @@ use App\Supports\Traits\Helpers; use Carbon\Carbon; use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Redis; use Symfony\Component\Cache\Adapter\RedisAdapter; use Symfony\Component\Cache\Adapter\RedisTagAwareAdapter; use Tmdb\Client; @@ -28,7 +29,7 @@ class TmdbClient use CleanItems, Helpers; private static $instance; private $ttl = 3600*24; - private $use_cache = true; + private $use_cache = false; /** @var Client $client **/ public $client; private static $api_keys = ['aba8176c9250ba755ca1783de87528a2', '5c6763d6500cc611d442a5414e951c05']; @@ -74,7 +75,7 @@ public function __construct($tmdb_key = null, $use_cache = false, $cache_time = */ // $cache = new FilesystemAdapter('php-tmdb', 86400, '/home/cache'); $redisConnection = RedisAdapter::createConnection('redis:///var/lib/redis/redis.sock/15'); - $cache = new RedisTagAwareAdapter($redisConnection, 43200); + $cache = new RedisTagAwareAdapter($redisConnection, 3600*24); // $requestListener = new RequestListener($client->getHttpClient(), $ed); $requestListener = new Psr6CachedRequestListener( $client->getHttpClient(), diff --git a/config/services.php b/config/services.php index 68df6b5..cf7bc2b 100644 --- a/config/services.php +++ b/config/services.php @@ -32,7 +32,7 @@ ], 'tmdb' => [ 'key' => env('TMDB_KEY', 'a07e22bc18f5cb106bfe4cc1f83ad8ed'), - 'use_cache' => env('TMDB_USE_CACHE', true), + 'use_cache' => env('TMDB_USE_CACHE', false), 'cache_ttl' => env('TMDB_CACHE_TTL', 3600*24), ], 'api' => [ diff --git a/resources/views/components/footer.blade.php b/resources/views/components/footer.blade.php index 014ebda..6ac2dbb 100644 --- a/resources/views/components/footer.blade.php +++ b/resources/views/components/footer.blade.php @@ -21,20 +21,26 @@ @if(request()->routeIs('home'))
@endif
@@ -53,12 +59,12 @@