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?

 
MrKDilkington replied on at Permalink Reply
MrKDilkington