Frage

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.

War es hilfreich?

Lösung 2

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

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top