Tawheedyahya started a new conversation+100 XP
2mos ago
Hi everyone 👋 I’m facing an issue with Laravel cache and Redis. Here are the details: OS: Ubuntu PHP: PHP 8.3 Laravel: 12 Redis: installed via apt and also tested with Docker
Redis PHP extension: php-redis installed
What I did:
Set Redis as cache store in .env: CACHE_STORE=redis REDIS_HOST=127.0.0.1 REDIS_PORT=6379
Cleared config cache: php artisan optimize:clear
Verified in Tinker: config('cache.default'); // returns "redis"
The problem:
Using the Redis facade works: Redis::set('test', 'ok');
But the Cache facade does not store anything: Cache::put('name', 'yahi', 300); Cache::get('name'); // returns value, but key not visible in redis
I use jwt/tymon To generate token but go to dashboard token not provided