Caching changes and refactoring, includes Fix for Wobu - TestCacheCollectionIds test case