Improved clear cache API