質問

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.

役に立ちましたか?

解決 2

You may found that in CRedisCache sources - this class uses string keys (i.e. SET, SETNX commands)

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top