Extend cache clearance functionality

Untested at the moment