making the cache module more generic so that we can easily switch out for memcached later without changing much