application = $application; $this->collectionRepositoryFactory = $collectionRepositoryFactory; $this->cache = $cache; $this->baseCacheKey = (string)$baseCacheKey; } /** * @param int $databoxId * @return CollectionRepository */ public function createRepositoryForDatabox($databoxId) { $repository = $this->collectionRepositoryFactory->createRepositoryForDatabox($databoxId); return new CachedCollectionRepository( $this->application, $repository, $this->cache, $this->baseCacheKey . '.' . $databoxId ); } }