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 01:31:43 UTC
groovy git commit: Provide one more constructor for LRU cache
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 <su...@apache.org>
Authored: Mon Dec 11 09:31:39 2017 +0800
Committer: sunlan <su...@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;
}