# Smarty nocache ?

**URL:** <https://forum.shopware.com/t/smarty-nocache/45554>\
**Category:** Themes & Design\
**Created:** [3. Mai 2017 um 12:05 UTC](https://forum.shopware.com/t/smarty-nocache/45554 "2017-05-03T12:05:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwdgensert](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@gwdgensert](https://forum.shopware.com/u/gwdgensert)\
**Post date:** [3. Mai 2017 um 12:05 UTC](https://forum.shopware.com/t/smarty-nocache/45554/1 "2017-05-03T12:05:16Z")

</div>

Hallo zusammen,

ich möchte im Template eine Variable abhängig vom Referer festlegen. Leider wird diese Variable gecached:

**{if strpos($smarty.server.HTTP\_REFERER, ‘[muster.de](http://muster.de)’) == false}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {assign var=“animate” value=“animate” nocache}  
{else}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {assign var=“animate” value=“static” nocache}  
{/if}  
{$animate nocache}**

Wie kann ich das Caching an dieser Stelle deaktivieren?&nbsp;

Danke und Grüße  
Felix

---

<div class="post-metadata">

**Author:** ![jozzan1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jozzan1](https://forum.shopware.com/u/jozzan1)\
**Post date:** [20. Juni 2017 um 13:26 UTC](https://forum.shopware.com/t/smarty-nocache/45554/2 "2017-06-20T13:26:07Z")

</div>

Wuerde mich auch mal interressieren.

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [20. Juni 2017 um 13:34 UTC](https://forum.shopware.com/t/smarty-nocache/45554/3 "2017-06-20T13:34:25Z")

</div>

Da musst du dir ein eigenes Action-Widget bauen:&nbsp;[Shopware HTTP cache](https://developers.shopware.com/developers-guide/http-cache/#action-tag)
