I am facing problem in Redis in laravel framework. Actullay. I have done almost everything. I am putting and getting data in Redis like this:-
use Illuminate\Support\Facades\Redis;
public function redisSet(){
Redis::set('name', 'Taylor');
echo "redis set successfully"; die;
}
public function redisget(){
echo Redis::get('name'); die;
}
Now there are two urls like below:-
http://localhost:8000/redis-set
http://localhost:8000/redis-get
Both above url working fine. Now problem is when i hit the set url in Google chrome and trying to get in mozilla firefox its also printing in mozilla firefox. that must not happen. If set redis in Google chrome its must be get in google chrome only not other browser. See images below:-
Now when i hit the get url in uc browser. its data is showing. but it must not happen. because i have set the redis in google chrome.
Below is my database.php file :-
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
My env file:-
BROADCAST_DRIVER=log
CACHE_DRIVER=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
I have also installed the prdeis of larvel. Please help me how to resolve this issue. My system is connected with network when i access the same url in other system its also showing the redis data. Please help me to resolve this issue.