문제

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