Download the PHP package clickalicious/memcached.php without Composer

On this page you can find all versions of the php package clickalicious/memcached.php. 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 memcached.php


Plain vanilla PHP Memcached client library with full support of Memcached ASCII protocol

Build Status Scrutinizer Scrutinizer Coverage clickalicious open-source
GitHub release Waffle.io SensioLabsInsight Packagist

Table of Contents

Features

Memcached.php covers almost 100% of the Memcached protocol specification. The code is clean, full documented and developed following the PSR coding standards (PSR-0/4, PSR-1, PSR-2). The code is unit-tested (PHPUnit) and the coverage is high. The library supports \<incr> and \<decr> command on stored integers (strings) and the connection handling is done like recommended in the Memcached protocol specification. Last but not least it supports seven of PHP's eight variable types - in detail four scalar types:

boolean
integer
float (floating-point number [double])
string

two compound types:

array
object

and finally one special type:

NULL

So resource is the only type not supported.

Example

You will find a demonstration Demo.php showing in detail how to use the Memcached.php client.

Requirements

Philosophy

This client is neither tested nor designed to be used in heavy load environments. It was designed and developed by me as a client library for my phpMemAdmin project. So I was able to remove dependencies of both Memcache + Memcached (PECL) extensions - both are designed in a way i don't like. I've tried to align 100% with the Memcached protocol specification. In some cases I didn't liked the naming convention and so I created some proxies. As an example - I decided to implement increment() as proxy to incr() and decrement() as proxy to decr(). I will add some more responsibilities in some more classes like a PSR compatible Caching proxy and a Pool/Cluster Class for management operations soon.

Versioning

For a consistent versioning i decided to make use of Semantic Versioning 2.0.0 http://semver.org. Its easy to understand, very common and known from many other software projects.

Roadmap

Throughput Graph

Installation

The recommended way to install this library is through Composer. Require the clickalicious/memcached.php package into your composer.json file:

Memcached.php is also available as download from github packed as zip-file or via git clone https://github.com/clickalicious/Memcached.php.git .

Data

Strings, Integers and Float-Values are never modified by this library in any way. Those types will be stored by Memcached's internal system - while all other types will be serialized by this client and can optionally be stored compressed (LZW/Smaz) - in one of the next releases of this library - targeting 0.4.0. I'm working on an PoC implementation of Smaz - a short string compression library (https://github.com/zhenhao/smaz.php) and on a german translation of the translation table used by Smaz.

Metadata

Memcached provides a 32 Bit (Version > 1.2.1) unsigned Integer field for meta data. From the Memcached protocol specification:

Note that in memcached 1.2.1 and higher, flags may be 32-bits, instead of 16, but you might want to restrict yourself to 16 bits for compatibility with older versions.

Memcached.php uses this field for its meta data. The meta data is required to mark data for serialization and stuff like this. This meta data is stored via the clients` flags field. The lower first 8 Bits (lowest Byte) are reserved by Memcached.php. The other 8 Bits (half of the 16 Bits) can be used by your app.

Documentation

The best and currently only existing documentation is the inline documentation of this project. So please have a look at the source to understand how Memcached.php works internally.

Tests

Memcached.php is unit-tested and the code coverage is high. For an in-detail view have a look at this always up to date Code Coverage report.

Running the Tests
You will find a PHPUnit configuration including testsuites in directory tests/. To run those configuration execute the following command on cli:

Tests

The unit-tests are fired against an existing and real Memcached daemon. Please be aware that you need a running Memcached deamon on the host you run the unit-tests listening on the default port (11211). In Result the unit-tests are not that isolated cause they are bound to a running Memcached daemon and network as well.

Versioning

For a consistent versioning i decided to make use of Semantic Versioning 2.0.0 http://semver.org. Its easy to understand, very common and known from many other software projects.

Roadmap

If you are interested in any of these features too - please let me know. Maybe we can adjust the priority and speed things up ...

Participate & share

... yeah. If you're a code monkey too - maybe we can build a force ;) If you would like to participate in either Code, Comments, Documentation, Wiki, Bug-Reports, Unit-Tests, Bug-Fixes, Feedback and/or Critic then please let me know as well!

Sponsors

Thanks to our sponsors and supporters:

JetBrains Navicat
Copyright

Icons made by Freepik licensed by CC 3.0 BY


All versions of memcached.php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
gpupo/cache Version ^1.2
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 clickalicious/memcached.php contains the following files

Loading the files please wait ....