I used memcached on Linux (there are versions on Windows and MacOS, as well as almost any other OS), It is pretty simple.
I worked with it directly, using indy TIDTelnet, reading the protocol documentation , I used set , get , delete and exit .
I used the following commands (I installed and got a "name", 14 is the number of bytes to be saved):
osama@osama :~$ telnet 127.0.0.1 11211 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. set name 0 0 14 Osama Alassiry STORED get name VALUE name 0 14 Osama Alassiry END quit
memcached allows you to store up to 1 MB per cache key, I used compound keys such as "Person | 17 | name", "Person | 17 | picture", "Employee | 7 | Salary | Basic" (these are dummy names unrelated to what I really did) ... I saved some binary files in the cache as base64, which allows using up to 768 thousand binary data.
memcached can also be distributed across multiple servers by hashing keys and selecting one of several hash-based servers.
source share