Php-zero-cache is a PHP bindings for the zero-cache kernel space caching system.
You need the C++ compiler and SWIG to build this software. Also the source code of the zero-cache system is needed.
-
Check what symlinks to zero-cache sources in
source
directory of the php-zero-cache project is correct. -
Build binaries with GNU Make. Type this command in the project's root directory:
$ make
-
Build debian package if you use Debian-based Linux distribution:
$ make deb
You can find debian packages in the php-zero-cache/deb
directory.
Debian-based Linux distribution users can install debian packages from
php-zero-cache/deb
directory.
Another way is installing with Makefile default mechanism:
$ make install
You must specify following parameter in your php.ini config to use php-zero-cache module:
enable_dl = On
First of all you must load the server zero-cache module into your kernel:
$ insmod source/server/zero_cache.ko
The zero_cache
device file will be created at the /dev
directory. Now the
zero-cache server is ready to work.
Your client application must include the zero_cache.php
file to access
zero-cache classes.
This is example of typical client application for Unix socket based connection:
#!/usr/bin/env php
<?php
include("zero_cache.php");
$client = new TypedClient();
$index = 0;
$data = 1024;
$client->WriteLong($index, $data);
$result = $client->ReadLong($index);
More usage examples you can find in files of test
directory.
Free use of this software is granted under the terms of the GNU Lesser General
Public License (LGPL). For details see the file LICENSE
included with the zero-cache distribution.