caching and common path detection