testing cache for both memory location and constriant