smarter cache
clear cache at exit