Implemented functionality to drop and optimise a cache or all caches at once.