How to create cache key using pageable and object?

Viewed 184

I have the below function

public Iterable<PageLayout> getAll(final Pageable pageable, PageLayout entity, List<String> exactSearchingFields, boolean ignoreOrga) {
        return super.getAll(pageable, entity, exactSearchingFields, ignoreOrga);
    }

I am trying to apply @Cacheable

@Cacheable(value = "PageLayouts", key = "#pageable.toString().concact('-').concat(#entity.toString())")

but the above key is caching but if we send arguments within the URL, it shows all the data.

0 Answers
Related