# http cache controller liste programmatisch ändern

**URL:** https://forum.shopware.com/t/http-cache-controller-liste-programmatisch-andern/52661
**Category:** Programmierung
**Created:** [30. April 2018 um 09:38 UTC](https://forum.shopware.com/t/http-cache-controller-liste-programmatisch-andern/52661 "2018-04-30T09:38:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wontfix](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@wontfix](https://forum.shopware.com/u/wontfix)
#### Post date: [30. April 2018 um 09:38 UTC](https://forum.shopware.com/t/http-cache-controller-liste-programmatisch-andern/52661/1 "2018-04-30T09:38:20Z")

</div>

> **[Understanding the Shopware HTTP Cache](https://developers.shopware.com/blog/2015/02/11/understanding-the-shopware-http-cache/)**
>
> The Shopware HTTP cache is available for production since shopware 4.1.0. It allows you to cache responses of the shop system,
> so that the next time the sa

[Shopware HTTP cache](https://developers.shopware.com/developers-guide/http-cache/)

also wir können unsere plugin controller url in die liste durch shopware-backend manuell addieren oder entfernen. und haben dadurch caching für unsere plugin urls, cool!

aber wie können wir diese durch unsere plugin addieren/entfernen?

ich hätte gern eine checkbox in meine plugin einstellungen (das weiss ich wie zu machen) und diese sollte die http cache für url “widgets/myplugin” ein/aus steuern.

in der oberigen dokumentation habe ich nichst gefunden, aber ich hab in datenbank tabelle `s_core_config_values`&nbsp;ein string mit allen http cache controllern gefunden…

gibts dafür wirklich keine methoden es programmatisch zu manipulieren?

wenn nicht, wie kriegen wir diese datenbank eintrag garantiert?

und was ist diese lustige string:&nbsp;`s:399:"frontend/listing 3600\nfrontend…"` fürn format?

oder soll ich was anderes benutzen/machen?

---

<div class="post-metadata">

### Author: ![arnebecker](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@arnebecker](https://forum.shopware.com/u/arnebecker)
#### Post date: [30. April 2018 um 10:16 UTC](https://forum.shopware.com/t/http-cache-controller-liste-programmatisch-andern/52661/2 "2018-04-30T10:16:57Z")

</div>

Das ist das Ergebnis der PHP Funktion serialize(). Um unserialize() bekommst du wieder einen string zurück.

[http://php.net/manual/de/language.oop5.serialization.php](http://php.net/manual/de/language.oop5.serialization.php)

---

<div class="post-metadata">

### Author: ![h\_lohaus](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@h\_lohaus](https://forum.shopware.com/u/h_lohaus)
#### Post date: [30. April 2018 um 10:26 UTC](https://forum.shopware.com/t/http-cache-controller-liste-programmatisch-andern/52661/3 "2018-04-30T10:26:03Z")

</div>

Hi,

es gib dazu den CacheRouteInstaller:

Gruß Heiner

---

<div class="post-metadata">

### Author: ![wontfix](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@wontfix](https://forum.shopware.com/u/wontfix)
#### Post date: [30. April 2018 um 10:40 UTC](https://forum.shopware.com/t/http-cache-controller-liste-programmatisch-andern/52661/4 "2018-04-30T10:40:47Z")

</div>

cool, danke an beide!

_notiz für mich, Shopware\Components\HttpCache\CacheRouteInstaller wurde addiert in shopware 5.3.5 (und wir sind immer noch auf 5.2.x \*sigh\*)_
