From 9f7140a41e435a46d1ef5c445123fb27ff650e71 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Tue, 2 Aug 2016 10:21:13 +0700
Subject: [PATCH] kurangi limit cache reverseUrls

---
 neoxmlinutil.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/neoxmlinutil.js b/neoxmlinutil.js
index c8f5f6a..79ffaf1 100644
--- a/neoxmlinutil.js
+++ b/neoxmlinutil.js
@@ -6,7 +6,7 @@ var logger = console;
 
 var oraCon;
 
-var reverseUrlCache = LRU({max: 30, maxAge: 60 * 1000});
+var reverseUrlCache = LRU({max: 20, maxAge: 60 * 1000});
 
 function init(options) {
     if (options && options.logger) {
@@ -73,6 +73,7 @@ function getReverseUrl(msisdn, callback) {
     if (!urls) {
         getReverseUrlFromDb(msisdn, callback);
     } else {
+        logger.verbose('Got cache hit on reverse url for ' + msisdn);
         callback(null, retval);
     }
 }
-- 
1.9.0