fix caching with pagination