how to use Embedded Hazelcast caching and pagination?

28 Views Asked by At

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
}
0

There are 0 best solutions below