finished writing NodeCache class; probably needs debugging