Skip to content

ellysh/php-zero-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Php-zero-cache 2.2 version

INTRODUCTION

Php-zero-cache is a PHP bindings for the zero-cache kernel space caching system.

BUILDING

You need the C++ compiler and SWIG to build this software. Also the source code of the zero-cache system is needed.

  1. Check what symlinks to zero-cache sources in source directory of the php-zero-cache project is correct.

  2. Build binaries with GNU Make. Type this command in the project's root directory:

    $ make

  3. Build debian package if you use Debian-based Linux distribution:

    $ make deb

You can find debian packages in the php-zero-cache/deb directory.

INSTALLING

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

CONFIGURATION

You must specify following parameter in your php.ini config to use php-zero-cache module:

enable_dl = On

USAGE

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.

EXAMLPES

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.

COPYING

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.

About

PHP bindings for zero-cache system's client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages