/**
* @param bool $cache
*/
public function __construct($cache)
{
$this->filesystem = new Filesystem();
$this->moduleContainer = new Container();
$this->cache = !$cache;
$container = AppFactory::getInstance()->getContainer();
$container['cache'] = function () {
$cacheContainer = new Container();
$cacheContainer->singleton('files', function () {
return new Filesystem();
});
$cacheContainer->singleton('config', function () {
return AppFactory::getInstance()->getContainer()->config['cache'];
});
return new CacheManager($cacheContainer);
};
$this->cacheManager = $container->get('cache');
}