cache paginated queries