Move cache key hashing into CACHE_KEY_FUNC

Memcache does not support control characters, so hashing the constructed key
and getting the hex digest prevents this from being a problem.

Signed-off-by: Byron Ruth <b@devel.io>