Because we don't know how to produce their cache key?  What should be the cache key for a repository stored in memory?  Or "in the cloud"?  We don't know, and we don't have a factory method on the Repository class to give us one.

I guess the change here would be to instead add a getRepositoryCacheKey() method to Repository and allow the implementation to override it with the key for this repository, then we can register and close through that key object.