I am using a quota policy as below.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Quota async="false" continueOnError="false" enabled="true" name="CopperQuota" type="calendar"> <DisplayName>CopperQuota</DisplayName> <Properties/> <Identifier ref="app.name"/> <Allow countRef="actualLimit"/> <StartTime>2017-2-23 12:00:00</StartTime> <Interval>5</Interval> <TimeUnit>minute</TimeUnit> <Distributed>true</Distributed> <Synchronous>true</Synchronous> </Quota>
I have a requirement to send the current count in response. I am using js policy for this as below.
context.setVariable("CopperCount", parseInt(context.getVariable("ratelimit.CopperQuota.used.count")));
But I have observed that the count is inconsistent though I am triggering multiple requests within the 5 minute window. Is this an Apigee issue. Please confirm