protected function configureCacheProvider()
{
if (app()->environment('production') || config()->get('cache.default') !== 'memcached') {
return;
}
try {
if (!class_exists('Memcached')) {
throw new Exception();
}
(new MemcachedConnector())->connect(config('cache.stores.memcached.servers'));
} catch (Exception $e) {
config()->set('cache.default', 'array');
}
}