Hi,

i wanna enabling Statamic’s Redis Cache driver for performance optimization.

i was reading caching with Redis and following step by step.

here is the my .env setting.

CACHE_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_DATABASE=0

I visited the my statamic site after finishing all the settings, but I got the error message below.

ConnectionException in AbstractConnection.php line 155:
`SELECT` failed: ERR invalid DB index [tcp://127.0.0.1:6379]
in AbstractConnection.php line 155
at AbstractConnection->onConnectionError('`SELECT` failed: ERR invalid DB index', '0') in StreamConnection.php line 263
at StreamConnection->connect() in AbstractConnection.php line 180
at AbstractConnection->getResource() in StreamConnection.php line 288
at StreamConnection->write('*2 $3 GET $22 laravel:stache::config ') in StreamConnection.php line 394
at StreamConnection->writeRequest(object(StringGet)) in AbstractConnection.php line 110
at AbstractConnection->executeCommand(object(StringGet)) in Client.php line 331
at Client->executeCommand(object(StringGet)) in Client.php line 314
at Client->__call('get', array('laravel:stache::config')) in RedisStore.php line 54
at RedisStore->get('stache::config') in Repository.php line 98
at Repository->get('stache::config') in Repository.php line 86
at Repository->has('stache::config')
at call_user_func_array(array(object(Repository), 'has'), array('stache::config')) in CacheManager.php line 318
at CacheManager->__call('has', array('stache::config')) in Cache.php line 53
at Cache::has('stache::config') in Manager.php line 93
at Manager->hasConfigChanged() in StacheServiceProvider.php line 199

but redis-cli command line utility works fine. (Redis version is 3.2.10 on the CentOS 7)

Is this something that's not possible or I'm missing something ?

thanks.

Answered by Jason Varga! Go to answer.