groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8410) Provide a common cache
Date Mon, 11 Dec 2017 15:10:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Sun updated GROOVY-8410:
-------------------------------
    Description: 
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.

The common cache should:
1) has two version: thread-safe and not thread-safe for different senario
2) achieve basic cache function(manage keys and values, LRU, etc.)
3) can specify the map that the cache is based on(Maybe we need WeakHashMap or other Map instance
sometimes)

Here is the implementation of the common cache:
https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java


  was:
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.

The common cache should:
1) be thread safe
2) achieve basic cache function(manage keys and values, LRU, etc.)
3) can specify the map that the cache is based on(Maybe we need WeakHashMap or other Map instance
sometimes)

Here is the implementation of the common cache:
https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.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.
> The common cache should:
> 1) has two version: thread-safe and not thread-safe for different senario
> 2) achieve basic cache function(manage keys and values, LRU, etc.)
> 3) can specify the map that the cache is based on(Maybe we need WeakHashMap or other
Map instance sometimes)
> Here is the implementation of the common cache:
> https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/runtime/memoize/CommonCache.java
> https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java



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

Mime
View raw message