Spec-Zone .ru
спецификации, руководства, описания, API

15.6.3. Developing a memcached Application

15.6.3.1. Basic memcached Operations
15.6.3.2. Using memcached as a MySQL Caching Layer
15.6.3.3. Using libmemcached with C and C++
15.6.3.4. Using MySQL and memcached with Perl
15.6.3.5. Using MySQL and memcached with Python
15.6.3.6. Using MySQL and memcached with PHP
15.6.3.7. Using MySQL and memcached with Ruby
15.6.3.8. Using MySQL and memcached with Java
15.6.3.9. Using the memcached TCP Text Protocol

A number of language interfaces let applications store and retrieve information with memcached servers. You can write memcached applications in popular languages such as Perl, PHP, Python, Ruby, C, and Java.

Data stored into a memcached server is referred to by a single string (the key), with storage into the cache and retrieval from the cache using the key as the reference. The cache therefore operates like a large associative array or hash table. It is not possible to structure or otherwise organize the information stored in the cache. To emulate database notions such as multiple tables or composite key values, you must use encode the extra information into the strings used as keys. For example, to store or look up the address corresponding to a specific latitude and longitude, you might turn those two numeric values into a single comma-separated string to use as a key.