-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
48 lines (38 loc) · 1.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Copyright (C) 2009 Jeff Trudeau
This program is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version. This program is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should
have received a copy of the GNU General Public License along with this program. If not, see
http://www.gnu.org/licenses/.
Enhanced client libraries for memcached.
* Provides optional, configuration-enabled support for:
* Replication among groups of memcached servers.
* Persistence to generic datasources.
* Partitioning of data to multiple tables within a datasource (e.g., disperse_data, disperse_lock, disperse_session)
* Cache-based sessions (depending on language).
* Uses a shared XML configuration so that multiple languages can access cached data in the same manner, thus enabling support for hybrid (multi-language) software systems.
* Languages supported:
* PHP
* Languages planned:
* Java
* Perl
* Python
* Ruby
* Future features:
* Support for multiple datasources (language-specific?)
PHP Example:
// include the library
include('/path/to/disperse/disperse.php');
// load default configuration file
Disperse::initialize();
// disperse can now optionally load any configuration file
Disperse::initialize('/path/to/other/file.xml');
// get reference to cache
$cache =& CacheFactory::getInstance();
// setup something to cache
$value = 'here is some data that needs to be cached';
// update item in cache
$cache->set('some key', serialize($value));
// library handles storage of key/value according to configuration