Invalidace (kompletne zrušenie) cache zadané v latte
- MKI-Miro
- Člen | 277
{contentType application/xml}
{cache expire => '3 days'}
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>{$siteUrl}{link Product:news}</loc>
</url>
....
public function renderXml(): void
{
$cache = new Cache($this->storage);
$cache->clean([
$cache::ALL => true,
]);
$this->template->authorsAll = $this->authorRepository->findAll()->order("name ASC");
....