Optimizes and cleans up invalidatePropertyCache.