How to implement pagination and caching in apigee

how to implement pagination and caching in apigee

ex:employeeSecreen

i have a screen consist of four search fields(f1,f2,f3,f4) and i need to cache the data in response cache and implement pagination in javascript.

Done scenario:

I have created a cachekey=x+y; and storing the response in response cache and doing filter based on user search (f1,f2,f3,f4) and then doing filtering.

When user is creating new employee that time i am invalidating the cache and then the new record will appear in sceen.

Problem:

In this way if perform filter in javascript performance will degrade.

--I need to implement only caching and pagination but not filtering in this employee screen how can i do this.

--in this case cachekey=x+y+f1+f2+f3+f4; will not work because while creating employee time i need to invalidate all cache lot of cache(with different key) will form that i can not predect.

0 1 499
1 REPLY 1

if perform filter in javascript performance will degrade.

Are you sure? Do you know that? Have you measured this behavior for the loads you expect the system to bear? At various levels of load?

In distributed systems, often in-memory manipulation is fast and efficient (eg, filtering in JS), while data access (with a network traversal) is more expensive. If you have no data to support the idea that "performance will degrade", you may want to question your assumptions.

Would it be possible to implement the filtering in JavaScript and see how it goes? And then if that works well, but does not perform well, then maybe you can look at a more elaborate caching approach? (Maybe with a chained proxy, or a shared flow)