Duplicate Disable/Enable Cache Function?
Permalink
Let me start by saying if possible i would like to refrain from overriding the core instead i want to simply replicate this function somewhere else.
What i would like to know is - can i replicate the form found on /dashboard/system/optimization/cache
specifically the 'Disable/Enable Theme Cache' buttons.. Is this possible?
I have a package i am developing for Theming and i would like to replace my clearcaches() function with a simple disable/enable cache switch.
The problem is that clearcaches() clears the block cache for Add-ons - this is undesirable but unfortunately for a user to see immediate changes made to the theme, the cache usually needs to be flushed( or disabled).
Yes i could just create a link to the Cache optimization page, but its a lot less convenient for users and many may forget to turn the Caching back ON once they are finished.
So id like to supply a button/toggle-switch for users so that once they 'Save' their changes, their exists a simple way to re- enable the theme cache.
Is this possible and if so can someone point me in the right direction?
What i would like to know is - can i replicate the form found on /dashboard/system/optimization/cache
specifically the 'Disable/Enable Theme Cache' buttons.. Is this possible?
I have a package i am developing for Theming and i would like to replace my clearcaches() function with a simple disable/enable cache switch.
The problem is that clearcaches() clears the block cache for Add-ons - this is undesirable but unfortunately for a user to see immediate changes made to the theme, the cache usually needs to be flushed( or disabled).
Yes i could just create a link to the Cache optimization page, but its a lot less convenient for users and many may forget to turn the Caching back ON once they are finished.
So id like to supply a button/toggle-switch for users so that once they 'Save' their changes, their exists a simple way to re- enable the theme cache.
Is this possible and if so can someone point me in the right direction?
Have you looked at how the Clear Cache page and controller are constructed?
https://github.com/concrete5/concrete5/blob/develop/web/concrete/con...
https://github.com/concrete5/concrete5/blob/develop/web/concrete/sin...