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?
Asked
Active
Viewed 236 times
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? – Robin Schambach May 03 '18 at 19:54
-
That would be a great option..yes. – ninjaroll May 03 '18 at 21:06
-
Template caches will get broken regardless of whether the changes were made in the AdminCP or your front end form. – andrew.welch Jul 03 '18 at 13:44
1 Answers
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: '*'
Robin Schambach
- 19,713
- 1
- 19
- 44