Store retrieval_methods in CacheImpl

Better type-safety.