update the config to configure memcached properly
refactor the memcache code a bit
setup memcache properly