<p>Please read <a href="https://craftcms.stackexchange.com/questions/24166/basic-ajax-how-to/24167#24167">this</a> to get to know how to create a basic ajax request</p>

<p>And change the route to </p>

<pre><code>action: 'utilities/clear-caches-perform-action',
caches: '*'
</code></pre>

CC BY-SA 4.0
2018-05-04T08:15:54.233Z
2018-05-04T08:15:54.233Z
Robin Schambach
<p>I currently implemented a fixed position edit button in the front-end when a user is logged in based on this " <a href="https://craftcms.stackexchange.com/questions/7104/get-entry-edit-link-in-twig">Get Entry Edit Link in Twig</a> " Is there a version of this link, but to Clear Cache?</p>

CC BY-SA 4.0
2018-05-03T19:54:05.250Z
No because clearing caches only works via ajax request as you can see here https://github.com/craftcms/cms/blob/develop/src/controllers/UtilitiesController.php#L329. Do you want to perform one?
Robin Schambach
CC BY-SA 4.0
2018-05-03T21:06:01.910Z
That would be a great option..yes.
ninjaroll
CC BY-SA 4.0
2018-07-03T13:44:35.167Z
Template caches will get broken regardless of whether the changes were made in the AdminCP or your front end form.
andrew.welch
<templating><craft3>
Front-end link to Clear Cache?
# Front-end link to Clear Cache?

(Asked by: username_0 on 2018-05-03)

I currently implemented a fixed position edit button in the front-end when a user is logged in based on this " [Get Entry Edit Link in Twig](https://craftcms.stackexchange.com/questions/7104/get-entry-edit-link-in-twig) " Is there a version of this link, but to Clear Cache?

**Tags:** templating, craft3
> **Comments:**
> **username_1**: No because clearing caches only works via ajax request as you can see here https://github.com/craftcms/cms/blob/develop/src/controllers/UtilitiesController.php#L329. Do you want to perform one?  
> **username_0**: That would be a great option..yes.  
> **username_2**: Template caches will get broken regardless of whether the changes were made in the AdminCP or your front end form.  

---

## 1 answers

### Answer by username_1 on 2018-05-04. Score: 1

Please read this to get to know how to create a basic ajax request
And change the route to 
action: 'utilities/clear-caches-perform-action',
caches: '*'


---

