Code Monkey home page Code Monkey logo

kohana_mmcached's Introduction

What is MMemcached

MMemcached is a well written module for popular Kohana PHP framework that enables your application to connect to multiple memcached servers at once.

How To

Instalation

At the end of your application's config.php file you will find few lines like this:

$config['modules'] = array
(
	// MODPATH.'auth',      // Authentication
	// MODPATH.'kodoc',     // Self-generating documentation
	// MODPATH.'gmaps',     // Google Maps integration
	// MODPATH.'archive',   // Archive utility
	// MODPATH.'payment',   // Online payments
);

To enable MMcached just add another one:

MODPATH.'mmemcached'

To set up the servers you have to add few entries in mmemcached.php config file. Example below:

$config['memcached_servers'] = array( 
  array('127.0.0.1' => '11211'),
  array('127.0.0.1' => '11111')
);

Usage

Using MMemcached is as simple as using standard Memcache PECL library. There are 8 methods available:

  • MMemcached::flush
  • MMemcached::get($key)
  • MMemcached::set($key, $var, $compress = false, $expire = 0)
  • MMemcached::add($key, $var, $compress = false, $expire = 0)
  • MMemcached::replace($key, $var, $compress = false, $expire = 0)
  • MMemcached::delete($key, $timeout = 0)
  • MMemcached::increment($key, $value = 1)
  • MMemcached::decrement($key, $value = 1)

For more information see the source code.

Version

WARNING: This is currently a RELEASE CANDIDATE. A version of this code is in production use on few sites but the extraction and refactoring process may have introduced bugs and/or performance problems. There are no known major defects at this point, but still.

Acknowledgments

Thanks to

  • Anna for supporting me :-)
  • Envie for paying me for development and allowing me to release this module

kohana_mmcached's People

Contributors

grzegorzkazulak avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.