mongodbcache Extends the Yii class 'CCache' to store cached data in mongoDB.

  1. NOTE: This extension is now part of the directmongosuite
  2. Requirements
  3. Usage

NOTE: This extension is now part of the directmongosuite

EMongoDBCache implements a cache application component by storing cached data in a mongodb. It uses the class 'EMongoDB' from YiiMongoDbSuite for an easy configuration of the connection to the mongoDB.

Requirements

Usage

Copy the file 'EMongoDBCache.php' to /protected/components of your application.

Register the class as 'cache' in config/main.php

'components' => array(

    	'cache' => array(
    	  'class'=>'EMongoDBCache',
	    	  //'mongoConnectionId' => 'mongodb', // (default) configId from YiiMongoDbSuite
	    	  //'collectionName' => 'mongodb_cache', // (default)
	    	  
                  //set to false after first use of the cache to increase performance
                  'ensureIndex' => true, 
		 ),

...
),

Use it like you would use any other cache component of the Yii Framework. Yii will now use mongoDB for caching.

5 0
12 followers
677 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Caching
Tags: Cache, mongodb
Developed by: Joblo
Created on: Mar 6, 2011
Last updated: 7 years ago

Downloads

show all

Related Extensions