Adds cache clearing to the toggle button.