function restartCache
% erase the persistent cache for QI algorithm so we can start fresh.
clear global cache free
global cache free
cache(1).parent=-1;
cache(1).i=0;
cache(1).size=0;
cache(1).X=0;
cache(1).D=0;
cache(1).A=0;
cache(1).T=0;
cache(1).g=[];
cache(1).h=[];
cache(1).child=[];

free=2;
end