# Template Cache automatisch löschen jede Stunde?

**URL:** <https://forum.shopware.com/t/template-cache-automatisch-loschen-jede-stunde/72575>\
**Category:** Allgemein\
**Created:** [5. Februar 2021 um 09:19 UTC](https://forum.shopware.com/t/template-cache-automatisch-loschen-jede-stunde/72575 "2021-02-05T09:19:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [5. Februar 2021 um 09:19 UTC](https://forum.shopware.com/t/template-cache-automatisch-loschen-jede-stunde/72575/1 "2021-02-05T09:19:08Z")

</div>

Hallo,

wir haben das Problem, dass wir per Plugin und CronJob die Kategorien deaktivieren, die keinen Bestand bzw. Artikel haben.

Das funktioniert auch, nur wird zum Beispiel die Kategorie in der Navi noch angezeigt, weil der Cache nicht geleert ist.

Kann man irgendwie einstellen, dass nur der template Cache automatisch vielleicht jede Stunde geleert wird?

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [5. Februar 2021 um 09:26 UTC](https://forum.shopware.com/t/template-cache-automatisch-loschen-jede-stunde/72575/2 "2021-02-05T09:26:40Z")

</div>

Ja, den Job “HTTP Cache löschen” entsprechend einstellen:&nbsp;[Shopware 5 - Einstellungen - System: Cronjobs](https://docs.shopware.com/de/shopware-5-de/einstellungen/system-cronjobs)

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [5. Februar 2021 um 10:20 UTC](https://forum.shopware.com/t/template-cache-automatisch-loschen-jede-stunde/72575/3 "2021-02-05T10:20:37Z")

</div>

Lösche ich mit dem Cron denn den gesamten Cache ?

Möchte nur den den Template Cache löschen.

---

<div class="post-metadata">

**Author:** ![iLuHa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/iluha/32/8191_2.png) [@iLuHa](https://forum.shopware.com/u/iLuHa)\
**Post date:** [5. Februar 2021 um 10:23 UTC](https://forum.shopware.com/t/template-cache-automatisch-loschen-jede-stunde/72575/4 "2021-02-05T10:23:35Z")

</div>

Eine andere Möglichkeit wäre es ggf. das entsprechende Plugin zu erweitern, dass das Plugin selbst direkt den Cache invalidiert.

Evtl. ist das hier hilfreich:&nbsp;[https://forum.shopware.com/discussion/45199/wie-beim-neuen-plugin-system-das-theme-kompilieren-lassen](https://forum.shopware.com/discussion/45199/wie-beim-neuen-plugin-system-das-theme-kompilieren-lassen)
