# Cache per Code löschen nach artikel Create

**URL:** <https://forum.shopware.com/t/cache-per-code-loschen-nach-artikel-create/27637>\
**Category:** Programmierung\
**Created:** [27. Mai 2015 um 08:51 UTC](https://forum.shopware.com/t/cache-per-code-loschen-nach-artikel-create/27637 "2015-05-27T08:51:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nexxoo](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nexxoo](https://forum.shopware.com/u/nexxoo)\
**Post date:** [27. Mai 2015 um 08:51 UTC](https://forum.shopware.com/t/cache-per-code-loschen-nach-artikel-create/27637/1 "2015-05-27T08:51:21Z")

</div>

Hallo, wir legen neue Artikel über ein Import Scrpit an, welches die Shopware APi verwendet. $this-\>articleResource = new \Shopware\Components\Api\Resource\Article(); $this-\>articleResource-\>create($artikelData); leider werden neue Artikel dann im Shop Frontend erst angezeigt, nachdem ich im Shopware backend den Cache leere. Hat jemand eine idee wie ich den Cache direkt nach dem Import per code löschen kann? Leider habe ich hierzu bisher nichts gefunden. Gruß Florian

---

<div class="post-metadata">

**Author:** ![Neox](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Neox](https://forum.shopware.com/u/Neox)\
**Post date:** [27. Mai 2015 um 09:13 UTC](https://forum.shopware.com/t/cache-per-code-loschen-nach-artikel-create/27637/2 "2015-05-27T09:13:44Z")

</div>

Hallo, hast du [http://wiki.shopware.com/REST-API-Cache … 2\_919.html](http://wiki.shopware.com/REST-API-Cache-Endpoint%5C_detail%5C_1682%5C_919.html) schon gesehen? Viele Grüße

---

<div class="post-metadata">

**Author:** ![nexxoo](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nexxoo](https://forum.shopware.com/u/nexxoo)\
**Post date:** [27. Mai 2015 um 12:30 UTC](https://forum.shopware.com/t/cache-per-code-loschen-nach-artikel-create/27637/3 "2015-05-27T12:30:05Z")

</div>

[quote=„Neoxx“]Hallo, hast du [http://wiki.shopware.com/REST-API-Cache … 2\_919.html](http://wiki.shopware.com/REST-API-Cache-Endpoint%5C_detail%5C_1682%5C_919.html) schon gesehen? Viele Grüße[/quote] Danke für den Stoß in die richtige Richtung. Leider erhalte ich hierbei noch eine Fehlermeldung: `$cacheResource = new \Shopware\Components\Api\Resource\Cache(); $cacheResource-\>setManager(Shopware()-\>Models()); $cacheResource-\>delete('all'); Fatal error: Call to a member function getCoreCache() on a non-object in /var/www/engine/Shopware/Components/Api/Resource/Cache.php on line 139 503 Service Unavailable` Mach ich etwas falsch?
