Set the right directory for caching.