We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug A clear and concise description of what the bug is.
// set a modelCache di
$di->setShared('modelsCache', function () {
$config = $this->getConfig(); $serializerFactory = new \Phalcon\Storage\SerializerFactory(); $adapterFactory = new \Phalcon\Cache\AdapterFactory($serializerFactory); $options = [ 'defaultSerializer' => 'Json', 'lifetime' => 7200, 'host' => $config->redis->host, 'port' => $config->redis->port, 'auth' => $config->redis->auth, 'index' =>1, ]; $adapter = $adapterFactory->newInstance('redis', $options); return new \Phalcon\Cache($adapter);
});
find a result: $data=config::find([ 'conditions'=>'status=1', 'cache'=>[ 'key' => 'model-config', 'lifetime' => 3600247, ], ]);
get error : "Data for JSON serializer cannot be of type object"
debugtrace
#0 [internal function]: Phalcon\Storage\Serializer\Json->serialize() #1 [internal function]: Phalcon\Storage\Adapter\AbstractAdapter->getSerializedData(NULL) #2 [internal function]: Phalcon\Storage\Adapter\Redis->set('model-config', Object(Phalcon\Mvc\Model\Resultset\Simple), 604800) #3 [internal function]: Phalcon\Cache->set('model-config', Object(Phalcon\Mvc\Model\Resultset\Simple), 604800) #4 [internal function]: Phalcon\Mvc\Model\Query->execute()
Details
The text was updated successfully, but these errors were encountered:
[#14528] - Fixed jsonSerializable for collection and json serializer
ee479e5
[#14528] - Updated Changelog
64a76de
[#14528] - Typo fix
45bef7b
Resolved in: #14529
Sorry, something went wrong.
No branches or pull requests
Describe the bug
A clear and concise description of what the bug is.
// set a modelCache di
$di->setShared('modelsCache', function () {
});
find a result:
$data=config::find([
'conditions'=>'status=1',
'cache'=>[
'key' => 'model-config',
'lifetime' => 3600247,
],
]);
get error :
"Data for JSON serializer cannot be of type object"
debugtrace
#0 [internal function]: Phalcon\Storage\Serializer\Json->serialize()
#1 [internal function]: Phalcon\Storage\Adapter\AbstractAdapter->getSerializedData(NULL)
#2 [internal function]: Phalcon\Storage\Adapter\Redis->set('model-config', Object(Phalcon\Mvc\Model\Resultset\Simple), 604800)
#3 [internal function]: Phalcon\Cache->set('model-config', Object(Phalcon\Mvc\Model\Resultset\Simple), 604800)
#4 [internal function]: Phalcon\Mvc\Model\Query->execute()
Details
The text was updated successfully, but these errors were encountered: