Python-zero-cache is a Python 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 that the symlinks to zero-cache sources in
source
directory of the python-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 python-zero-cache/deb
directory.
Debian-based Linux distribution users can install debian packages from
python-zero-cache/deb
directory.
Another way is installing with Makefile default mechanism:
$ make install
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 import the zero_cache
module to access
zero-cache classes.
This is example of typical client application:
#!/usr/bin/env python
import zero_cache
client = zero_cache.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.