matrix cache assignment