Skip to content

Commit

Permalink
Adding ttl to event data for incr and decr events
Browse files Browse the repository at this point in the history
  • Loading branch information
smadappa committed Sep 9, 2020
1 parent 6e542b3 commit fbcb3c9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,7 @@ public long incr(String key, long by, long defaultVal, int timeToLive) throws EV
final EVCacheKey evcKey = getEVCacheKey(key);
final EVCacheEvent event = createEVCacheEvent(Arrays.asList(clients), Call.INCR);
if (event != null) {
event.setTTL(timeToLive);
event.setEVCacheKeys(Arrays.asList(evcKey));
try {
if (shouldThrottle(event)) {
Expand Down Expand Up @@ -2256,6 +2257,7 @@ public long decr(String key, long by, long defaultVal, int timeToLive) throws EV
final EVCacheKey evcKey = getEVCacheKey(key);
final EVCacheEvent event = createEVCacheEvent(Arrays.asList(clients), Call.DECR);
if (event != null) {
event.setTTL(timeToLive);
event.setEVCacheKeys(Arrays.asList(evcKey));
try {
if (shouldThrottle(event)) {
Expand Down

0 comments on commit fbcb3c9

Please sign in to comment.