Properly clearing engine caches