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
Hi. I'm trying to setup a new project using yii3. Actually, I'm trying to implement a caching mechanism similar to how
Yii::$app->db->cache(function() use ($query) { return$query->one() } ...)
used to work in yii2 and I get this error. The Yii3 Redis cache handler is the one that serializes the value before saving into cache.
Is this expected? I guess it is because of the DB connection parameter?
Edit: Now I see that in yii2 only the raw results were cached, and then the models would be populated. Is there a better way other that creating an ActiveQuery and calling ->populate($rows)?
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
What is the expected result?
Serialize the object
What do you get instead?
Error
Additional info
Hi. I'm trying to setup a new project using yii3. Actually, I'm trying to implement a caching mechanism similar to how
used to work in yii2 and I get this error. The Yii3 Redis cache handler is the one that serializes the value before saving into cache.
Is this expected? I guess it is because of the DB connection parameter?
Edit: Now I see that in yii2 only the raw results were cached, and then the models would be populated. Is there a better way other that creating an
ActiveQuery
and calling->populate($rows)
?The text was updated successfully, but these errors were encountered: