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

Ian Boston commented on SLING-2555:
-----------------------------------

@Antonio
Do you want this to cache things that an application built on Sling might use, 
rather than some form of caching for Sling itself to use ?

Would something like [1] suit your needs. It was originally written (by me) for 
an Sling based application with an EhCache. IIRC there is also an Inifinspan 
implementation somewhere. It was used both low level objects and complete page 
responses. I had a quick scan of you patch on SLING-2546 and the API's look 
quite close. The only real requirement is that values are seriealizable if (and 
only if) they need to be sent over a network or down to disk. Otherwise any 
object will do. Keys are strings. The service allows the client to get a named 
cache specifying the requirements, eg Scope (Thread|Request|Local|Cluster 
invalidated|Cluster replicated). Thread uses Thread locals, Request needs a 
filter to drop at the end of the request and all the rest are EhCache.


@Tommaso   
The API is relatively simple would probably accept a DirectMemory impl 
replacing the EhCache parts.

If there are no objections from other committers, and it fits, I could split 
the API, bring it into the contrib area and do a impl of the portal Cache API 
as a service using it.

WDYT?

1 
https://github.com/ieb/sparsemapcontent/tree/master/extensions/memory/src/main/java/org/sakaiproject/nakamura/api/memory


                
> Provide Sling Caching Common service
> ------------------------------------
>
>                 Key: SLING-2555
>                 URL: https://issues.apache.org/jira/browse/SLING-2555
>             Project: Sling
>          Issue Type: Wish
>          Components: Commons
>            Reporter: Antonio Sanso
>            Priority: Minor
>
> It would be nice if Sling would provide some Caching capabilities.
> This can be reused in a number of situation. E.g. at the moment we have 
> SLING-2546 that could potentially leverage such a service.
> The caching storage might be based on EhCache or Apache DirectMemory 
> (http://incubator.apache.org/directmemory/)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to