Optimize local cache directory definition.