Commit Graph

15 Commits

Author SHA1 Message Date
Tomasz Grabiec
f00bc22067 memcache: add support for 'incr' and 'decr' commands 2014-10-18 12:59:59 +02:00
Tomasz Grabiec
3093e2c543 memcache: make data changes atomic
Transmission of data is not atomic so we cannot replace item's fields
in-place. This can lead to inconsistencies in "get" responses. We
should rather allocate a new item object replacing the one which is in
the cache.
2014-10-18 12:59:59 +02:00
Tomasz Grabiec
7ae9178439 memcache: introduce 'stats' command
Our version prints only a subset of statistics printed by stock memcache.
2014-10-18 12:59:59 +02:00
Tomasz Grabiec
287ad01f76 memcache: make cache::size() return only live items 2014-10-18 12:59:59 +02:00
Tomasz Grabiec
7c9e31a0b2 memcache: add 'cas' and 'gets' commands 2014-10-18 12:59:59 +02:00
Tomasz Grabiec
5c649c54fb memcache: add support for 'add' and 'replace' commands 2014-10-18 12:59:59 +02:00
Tomasz Grabiec
f3ebe8abe9 memcache: support 'noreply' on 'set' and 'delete' 2014-10-18 12:59:58 +02:00
Tomasz Grabiec
84d5b7098f memcache: implement 'version' command 2014-10-18 12:59:58 +02:00
Tomasz Grabiec
f2b1d16ce5 memcache: implement 'flush_all' command 2014-10-18 12:59:58 +02:00
Tomasz Grabiec
5d6eaaea33 ragel: reset string builder on init
Otherwise it will contain stale data from previous unsuccessful pass.
2014-10-16 12:24:30 +02:00
Tomasz Grabiec
c1dc3b0d53 memcache: handle end of stream properly on TCP 2014-10-16 11:45:32 +02:00
Tomasz Grabiec
cf2d72a360 memcache: recover from errors in the TCP stream
This is mostly to make memcapable from libmemcached happy.

When client issued a bad command, we should discard all data we have
so that the next command on that connection can succeed.
2014-10-16 09:11:11 +02:00
Tomasz Grabiec
ec42ca860a memcache: add TCP server 2014-10-15 15:59:42 +02:00
Tomasz Grabiec
d575ad2dfb memcache: introduce periodic stats printer 2014-10-15 15:59:42 +02:00
Tomasz Grabiec
88537320f3 memcache: initial version
Supports UDP and subset of ASCII protocol with the following commands:
get, set and delete.
2014-10-15 15:59:42 +02:00