I have this code that returns a list of order summary. Weblclient returns a list of 100 items. I want to cache the first 50 items and have pagination of size 5 with limit of 10 items per page
@Cacheable("ordersummary")
fun getProducts(): List<OrderSummary>? {
return webClient.get()
.retrieve()
.bodyToMono(OrderListResponse::class.java)
.block()?.orders
}