LUA Implementation of persistent memcached algorithm