memcached and other optimization