Greatly streamline the clearcache functions!