opt caching pkl optmized graph problem