Config::loadConfig()]; $params['config']['cron'] = true; //Debug::n_print($params); //Cache::clearCache('feed'); //Cache::clearCache('page'); //Cache::clearCache('post'); Cache::clearCache('posts'); $shaarli = new Shaarli($params); if (Cache::isValidFeed('shaarli', $shaarli->shaarliFeedUpdate)) { $shaarliCache = Cache::getCache('shaarli', 'feed'); $shaarliRegenCache = 'Shaarli : cache'; } else { Cache::unValidateCache('shaarli', 'feed'); Cache::unValidateCache('/', 'page'); $shaarli->getLastBookmark(); $shaarliCache = $shaarli->makeList(); Cache::setCache('shaarli', $shaarliCache, 'feed'); $shaarliRegenCache = 'Shaarli : regen'; } $nanogal = new NanoGal($params); if (Cache::isValidFeed('nanogal', $nanogal->nanogalFeedUpdate)) { $nanogalCache = Cache::getCache('nanogal', 'feed'); $nanogalRegenCache = 'Nanogal : cache'; } else { Cache::unValidateCache('nanogal', 'feed'); Cache::unValidateCache('/', 'page'); $nanogal->getLastBookmark(); $nanogalCache = $nanogal->makeList(); Cache::setCache('nanogal', $nanogalCache, 'feed'); $nanogalRegenCache = 'Nanogal : regen'; } $gitea = new Gitea($params); $gitea->getLastRepo(); $repoCache = $gitea->makeList(); if (Cache::isValidApi('gitea', $gitea->giteaHash)) { $repoCache = Cache::getCache('gitea', 'feed'); $giteaRegenCache = 'Gitea : cache'; } else { Cache::unValidateCache('gitea', 'feed'); Cache::unValidateCache('/', 'page'); Cache::setCache('gitea', $repoCache, 'feed'); $giteaRegenCache = 'Gitea : regen'; } $post = new Blogs($params); $post->getLastPost(); $postCache = $post->makeList(); if (Cache::isValidApi('posts', $post->postsHash)) { $postCache = Cache::getCache('posts', 'feed'); $postRegenCache = 'Post : cache'; } else { Cache::unValidateCache('posts', 'feed'); Cache::unValidateCache('/', 'page'); Cache::setCache('posts', $postCache, 'feed'); $postRegenCache = 'Post : regen'; } require __DIR__ . '/../../template/'.$params['config']['theme'].'/dev.php'; $content = ob_get_contents(); ob_end_clean(); return $content; } function title() { return $this->title; } }