From 0acbfd64bb048cc9281c9123b78b57b3f14f489e Mon Sep 17 00:00:00 2001 From: Petter Berven Date: Fri, 3 Aug 2018 13:12:30 +0200 Subject: [PATCH] get returns remaining ttl --- lib/resty/lrucache.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resty/lrucache.lua b/lib/resty/lrucache.lua index ef7c384..377a7b4 100644 --- a/lib/resty/lrucache.lua +++ b/lib/resty/lrucache.lua @@ -174,7 +174,7 @@ function _M.get(self, key) -- print("expired: ", node.expire, " > ", ngx_now()) return nil, val end - return val + return val, node.expire - ngx.now() end