I am trying to implement pagination in apigee
I followed the steps described below. If there is any thing we can do in a better way, please guide me.
(Proxy 1)
=======
1. I created a proxy which will bring all data from back end and attach Response cache to it which taking unique identifier as a key and storing object in cache.
(Proxy 2)
=======
2. I created proxy two and set target url as (proxy 1) and getting all the records and filtering using a JavaScript policy.
(Q) what precautions do i need to take while filtering records using the javascript policy?
(Q) I am planning to implement traffic Management in this proxy. How can i implement it.
Note: It is a multi user environment.
Hi Dinesh.
What you're doing sounds reasonable.
Connecting Proxy2 to Proxy 1 via a LocalTargetConnection might make things perform better.
I cannot think of any special considerations for filtering (and/or shaping) records using JavaScript. The usual considerations apply: minimize creation of objects. Avoid unnecessary logging and printing. Etc.
Traffic Management will work in the normal way, of course.
My friend Anil has done a great job with the video series covering Traffic Management, which you can find here.
Ok can u suggest me which is the best way to implement pagination and what traffic management polices give better performance.
Note:How can i minimize the object creation in response cachce?
1.In proxy1 I am caching the response using response cache here how many new user allowed to acess the proxy that much object it will create and Size limit of a cached item value: 512 KB if size exceed what will happen.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |