added missing assert
removed useless argument in cache code