Create a new factory to create the cache.