add tests for cache as well