Move memcache entry code to separate files.