You may found that in CRedisCache sources - this class uses string keys (i.e. SET
, SETNX
commands)
Yii CRedisCache.php will use which redis datatype for cache storage?
Question
I've studied Redis recently and i decided to use it as Cache storage in my PHP-Yii application.. Another decision i am convinced on is, i want to store cached data in form of HashMaps. Only problem is i dont know, about internal storage of this code..
Yii::app()->cache()->set($id,$value);
whether it will use lists, set, hashmaps or wat else? and if i could configure it somehow to use a particular data type..for performance measurement..!
there is no official description on Yii homepage.
FYI : CRedisCache is the class provided by Yii for cache management on Redis.
Solution 2
OTHER TIPS
Since CRedisCache.php extends Ccache.php , whatever data you set to the redis will be serialized by using serialized() and stored in redis, while getting data back from redis it unserialize() your data and gives back to you.