$serializerFactory = new \Phalcon\Storage\SerializerFactory();
$adapterFactory = new \Phalcon\Cache\AdapterFactory($serializerFactory);
$adapter = $adapterFactory->newInstance('redis', [
'defaultSerializer' => 'Json',
"host" => "***",
'lifetime' => 7200,
"auth" => "****",
]);
$cache = new \Phalcon\Cache\Cache($adapter);
$who = new \stdClass();
$who->name = "testName";
$cache->set("test", $who); // this line get error: Data for the JSON serializer cannot be of type 'object' without implementing 'JsonSerializable'
phalcon/Storage/Serializer/Json.zep can't serialize stdClass
Screenshots
Details