New tests and new cache logic