You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2017/12/11 02:50:02 UTC

[2/6] groovy git commit: Provide one more constructor for LRU cache

Provide one more constructor for LRU cache

(cherry picked from commit 0d8da15)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 286b4d656363df09e1aba914d2dab2ca33a13ce8
Parents: 6cd6487
Author: sunlan <su...@apache.org>
Authored: Mon Dec 11 09:31:39 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Mon Dec 11 10:49:37 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/286b4d65/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;
     }