You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error_reporting(E_ERROR);
Yii::$app->cache->set('someKey', 'someValue');
$print = VarDumper::export(Yii::$app->cache); // This will close redis connection// $print = serialize(Yii::$app->cache); // This will close redis connection// $print = var_export(Yii::$app->cache, true); // This won't close redis connection$cachedValue = Yii::$app->cache->get('someKey'); // This won't work at closed redis connection:// error_reporting(E_ERROR) :: >> Database Exception – yii\db\Exception::: Failed to read from socket. Redis command was: GET keyPrefix:someKey// error_reporting(E_ALL) :: >> PHP Warning – yii\base\ErrorException::: fwrite() expects parameter 1 to be resource, null given
What is the expected result?
Redis connection closes connection at serializing. This is normal behavior (see \yii\redis\Connection::__sleep).
However after serializing cache component won't work. I think redis connection should be restored.
Additional info
Q
A
Yii version
2.0.9
PHP version
5.5.34
Operating system
Mac OS X 10.11.5
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
Enable Redis cache in config:
Then execute:
What is the expected result?
Redis connection closes connection at serializing. This is normal behavior (see
\yii\redis\Connection::__sleep
).However after serializing cache component won't work. I think redis connection should be restored.
Additional info
The text was updated successfully, but these errors were encountered: