You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2017/12/11 03:37:00 UTC

[jira] [Comment Edited] (GROOVY-8410) Provide a common cache

    [ https://issues.apache.org/jira/browse/GROOVY-8410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285480#comment-16285480 ] 

Daniel Sun edited comment on GROOVY-8410 at 12/11/17 3:36 AM:
--------------------------------------------------------------

Hi Jochen,

     Here are some caches I found in Groovy codebase:

1. classCache -- refactored 
https://github.com/apache/groovy/blob/master/src/main/groovy/lang/GroovyClassLoader.java#L98

2. sourceCache -- refactored 
https://github.com/apache/groovy/blob/master/src/main/groovy/lang/GroovyClassLoader.java#L104

3. MacroMethodsCache -- refactored 
https://github.com/apache/groovy/blob/master/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroMethodsCache.java

4. ExtensionMethodCache -- refactored 
https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java#L2164

5. adapterCache -- use LRUCache
https://github.com/apache/groovy/blob/master/src/main/groovy/util/ProxyGenerator.java#L75

6. SimpleCache -- not refactored it(or replace it with a common cache)
https://github.com/apache/groovy/blob/master/subprojects/groovy-json/src/main/java/groovy/json/internal/SimpleCache.java




was (Author: daniel_sun):
Hi Jochen,

     Here are some caches I found in Groovy codebase:

1. classCache -- refactored 
https://github.com/apache/groovy/blob/master/src/main/groovy/lang/GroovyClassLoader.java#L98

2. sourceCache -- refactored 
https://github.com/apache/groovy/blob/master/src/main/groovy/lang/GroovyClassLoader.java#L104

3. MacroMethodsCache -- refactored 
https://github.com/apache/groovy/blob/master/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroMethodsCache.java

4. ExtensionMethodCache -- refactored 
https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java#L2164

5. SimpleCache -- not refactored it(or replace it with a common cache)
https://github.com/apache/groovy/blob/master/subprojects/groovy-json/src/main/java/groovy/json/internal/SimpleCache.java


> Provide a common cache
> ----------------------
>
>                 Key: GROOVY-8410
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8410
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 3.0.0-alpha-1, 2.5.0-beta-2, 2.4.13, 2.6.0-alpha-2
>            Reporter: Daniel Sun
>            Assignee: Daniel Sun
>             Fix For: 2.5.0-beta-3, 2.6.0-alpha-3, 3.0.0-alpha-2
>
>
> There are many cache implementation in Groovy, many of them are duplicated(e.g. cache algorithm, the code of implementation...). That is to say, Groovy is lack of a common cache.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)