matrix cache code complete