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 " Is there a version of this link, but to Clear Cache?
-
No because clearing caches only works via ajax request as you can see here github.com/craftcms/cms/blob/develop/src/controllers/…. Do you want to perform one?– Robin SchambachCommented May 3, 2018 at 19:54
-
That would be a great option..yes.– ninjarollCommented May 3, 2018 at 21:06
-
Template caches will get broken regardless of whether the changes were made in the AdminCP or your front end form.– andrew.welchCommented Jul 3, 2018 at 13:44
Add a comment
|
1 Answer
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: '*'