refactor and cleanup memcached template and modules
refactor and cleanup redis template and modules