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
$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'
Screenshots
Details
Phalcon version: 5.8.0
PHP Version: 8.3.9
The text was updated successfully, but these errors were encountered:
phalcon/Storage/Serializer/Json.zep can't serialize stdClass
Screenshots
Details
The text was updated successfully, but these errors were encountered: