This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Journalt
Journalt

I am managing OctoberCMS through FTP only, and when I need to empty the cache, I have to do it manually by deleting the files from: /cache /sessions /combiner /twig

I would really enjoy having a button in the backend that would clear the cache for me. Thanks for your consideration.

m4210
d.negativa
Flynsarmy
Flynsarmy

Does php artisan cache:clear do all this? If so it should be trivial to make a plugin that adds a 'Cache' settings page with a button that triggers this artisan command.

Edit: Looking at the code it only does /combiner and /twig dirs. Is that enough? If so I'll make a dashboard widget for you.

Last updated

gergo85
Dmi3yy
Daniel81
Daniel81

If you want to hook this up to a button in the backend via a $.request you can just use CacheClear::fireInternal(); in the requested method to clear the cache

Journalt
Journalt

@Flynsarmy : Yes a dashboard widget would be great. using the artisan command. I think October takes care of /combiner and /twig while laravel take care of /cache and /sessions, so it should be perfect!

Keios
Keios

I think that this widget really, really should allow to select which cache will be flushed. Flushing every cache in app would be quite irresponsible in production environment.

Flynsarmy
Flynsarmy

I've written a plugin that is just a simple dashboard widget with a 'Clear Cache' button. Download it here.

d.negativa
d.negativa

Thanks Flynsarmy!!!

Journalt
Journalt

How can I implement Flynsarmy widget if I am not using artisan? Should I copy the files through FTP? In that case, it's gonna be deleted on the next build update I guess...

Could anyone make it available through octobercms.com/plugins/ ?

Last updated

d.negativa
d.negativa
  1. download archive

  2. unpack it in such a path

plugins/flynsarmy/dashboardcachewidget

Flynsarmy
Flynsarmy

Thanks d.negativa. Readme added.

zorogat5480
zorogat5480

Very cool thanks Flynsarmy, it was a nightmare to delete cache files manually!

Mohsin
Mohsin

I think it would be a better idea to set up a cron job to do this periodically

1-16 of 16

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.