Download the PHP package kamisama/cakephp-memcached-engine without Composer

On this page you can find all versions of the php package kamisama/cakephp-memcached-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cakephp-memcached-engine

Memcached Cache engine for CakePHP Build Status Coverage Status Latest Stable Version Dependency Status

This is an alternative memcached cache engine to the memcache engine shipped by default with cakePhp. Default one uses the memcache extension, whereas this one uses the memcached extension. (notice the d)

Background

Benefits of Memcached over Memcache extension

Igbinary is the big win of the memcached extension.

Igbinary is a drop in replacement for the standard php serializer. Instead of time and space consuming textual representation, igbinary stores php data structures in a compact binary form. Savings are significant when using memcached or similar memory based storages for serialized data. You can expect about 50% reduction in storage requirement and speed is at least on par with the standard PHP serializer. Specific numbers depend on your data, of course.

see https://github.com/phadej/igbinary and some benchmark

For CakePHP 2.5+

As of CakePHP 2.5, the memcached engine will be included in the core by default. No installation required.

For CakePHP 2.2, 2.3 and 2.4

Installation

[Manual]

[GIT Submodule]

In your app directory type:

git submodule add -b master git://github.com/kamisama/CakePHP-Memcached-Engine.git Plugin/kamisama/Memcached
git submodule init
git submodule update

[GIT Clone]

In your Plugin directory type:

git clone -b master git://github.com/kamisama/CakePHP-Memcached-Engine.git Memcached

[Composer]

Add kamisama/cakephp-memcached-engine to your composer dependencies, then run

composer install

Enable plugin

You need to enable the plugin your app/Config/bootstrap.php file:

CakePlugin::load('Memcached');

If you are already using CakePlugin::loadAll();, then this is not necessary.

Usage

Add this line in the head of your core.php:

App::uses('MemcachedEngine', 'Memcached.Lib/Cache/Engine');

You can then use it in your cache configuration:

Cache::config('default', array('engine' => 'Memcached'));

For CakePHP 2.0 and 2.1

Installation

Since defining cache engine in a plugin is not supported yet on these version, you have to :

Enable plugin

You need to enable the plugin your app/Config/bootstrap.php file:

CakePlugin::load('Memcached');

If you are already using CakePlugin::loadAll();, then this is not necessary.

Cache::config('default', array('engine' => 'Memcached'));

Usage

Cache::config('default', array('engine' => 'Memcached'));

Settings

The memcached cache engine can take the following options:

Cache::config('router', array(
    # Usual options
    'engine' => 'Memcached',
    'prefix' => 'mc_',
    'duration' => '+7 days', // Expires in 7 days, from now
    'servers' => array(
        '127.0.0.1', // Default port 11211
        '127.0.0.1:11212' // Or you can specify the port
    )

    # Memcached options
    'compress' => false,
    'persistent' => false,
    'login' => null,
    'password => null,
    'serialize' => 'php'
));

compress

Default: true
Compress the cached data. Unlike memcache, memcached can increment/decrement compressed keys

persistent

Default: false
Use a persistent connection to the memcached server. To enable, set persistent to an unique string, to identify the connection. All configurations using the same persistent value will share a single underlying connection.

login and password

Default: null
The memcached server credidentials, if using SASL for authentication.

Memcached need to be compiled with SASL support, else it'll throw a CacheException.

serialize

Default: php
The engine used to serialize the data.

Available serializer supported by memcached:

The memcached extension is by default compiled with the php serializer. To use the other serializer, the memcached extension must be compiled with the appropriate options. Refer to Memcached documentation.

Using an invalid or not supported serializer engine will throw a CacheException.

igbinary is the recommended serializer.

Notes

Binary protocol is temporary disabled due to a Memcached issue with increment/decrement

Changelog

Ver 0.12 (2013-10-06)

Ver 0.11 (2013-09-19)

Ver 0.10 (2013-09-18)

Ver 0.9 (2013-09-04)

Ver 0.8 (2013-09-04)

NOTE: As of CakePHP 2.5, MemcachedEngine v0.8 will be included into the core.

Ver 0.7 (2013-08-26)

Ver 0.6 (2013-08-26)

Ver 0.5 (2013-08-26)

Ver 0.4 (2013-08-18)

Ver 0.3 (2012-08-29)

Ver 0.2 (2012-03-22)

License

This plugin is released under the MIT licence


All versions of cakephp-memcached-engine with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version *
ext-memcached Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kamisama/cakephp-memcached-engine contains the following files

Loading the files please wait ...