memcache optimization