groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Provide one more constructor for LRU cache
Date Mon, 11 Dec 2017 01:31:43 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 4d729e45a -> 0d8da15cc


Provide one more constructor for LRU cache


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/0d8da15c
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/0d8da15c
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/0d8da15c

Branch: refs/heads/master
Commit: 0d8da15ccb5c4f3afbf5cb8a8ef7dad97de4fa8e
Parents: 4d729e4
Author: sunlan <sunlan@apache.org>
Authored: Mon Dec 11 09:31:39 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Mon Dec 11 09:31:39 2017 +0800

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/0d8da15c/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java b/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
index 024dc915e..13e668f 100644
--- a/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
+++ b/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
@@ -65,6 +65,10 @@ public class CommonCache<K, V> implements EvictableCache<K, V>
{
         });
     }
 
+    public CommonCache(final int maxSize) {
+        this(16, maxSize);
+    }
+
     public CommonCache(Map<K, V> map) {
         this.map = map;
     }


Mime
View raw message