Redis module for Kohana3.2
PHP
Latest commit 4543b4d Apr 5, 2013 @JeremyWei update README.md
Permalink
Failed to load latest commit information.
classes
config
LICENSE.md
README.md
composer.json

README.md

koredis

This module is a wrapper of phpredis for kohana3.x. So make sure you have installed phpredis before you start.

Installation

###composer(recommand)

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

touch file composer.json in kohana root directory with the contents:

{
    "require": {
        "jeremywei/koredis": "dev-master"
    }
}

then run composer install, done.

###git submodule

$ git submodule add git://github.com/JeremyWei/koredis.git modules/koredis
$ git submodule update --init --recursive

Using

Enable:

Kohana::modules(array(
	 //'auth'       => MODPATH.'auth',       // Basic authentication
	 'cache'      => MODPATH.'cache',      // Caching with multiple backends
	 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
	 'database'   => MODPATH.'database',   // Database access
	// 'image'      => MODPATH.'image',      // Image manipulation
	// 'orm'        => MODPATH.'orm',        // Object Relationship Mapping
	 'unittest'   => MODPATH.'unittest',   // Unit testing
	// 'userguide'  => MODPATH.'userguide',  // User guide and API documentation
	 'koredis'   => MODPATH.'koredis',           // Redis
	));

Example:

$redis = Koredis::factory();
$redis->set('foo', 'bar');
$redis->get('foo');