There is also a test case CachingTestCase#testCacheExpiry that specifically
tests that cache expiry is working.

Azeez


On Fri, Aug 29, 2014 at 4:27 PM, Subash Chaturanga <[email protected]> wrote:

> Hi Azeez,
> Yes I also noticed identity components also uses this. But the prob is I
> am not sure whether they have tested this cache invalidation timeout
> specifically or they have a use case as such. But for us we do have. For
> resource/path caches we have NOT used the proper way of building the cache
> with expiry time. But for a new fix, we added such cache for notifications
> and we see all cache values expires in 15mins even though I have set it to
> 1000 days.
>
>
> On Fri, Aug 29, 2014 at 4:21 PM, Afkham Azeez <[email protected]> wrote:
>
>> setExpiry should work. AFAIK, the IS team is also using this.
>>
>>
>> On Fri, Aug 29, 2014 at 12:38 PM, Subash Chaturanga <[email protected]>
>> wrote:
>>
>>> Hi Azeez,
>>> In turing kernel, can we do $subject. We found "setExpiry" in your blog
>>> post  and following is the code we use, but we noticed it still timeouts in
>>> 15mins. Is there new API to do this or are we missing something ?
>>>
>>> CacheManager manager =
>>> Caching.getCacheManagerFactory().getCacheManager("inMemoryEventCacheManager").getCache("inMemoryEventCache").getCacheManager();
>>>
>>>         if(inMemoryEventCacheInit) {
>>>             return
>>> Caching.getCacheManagerFactory().getCacheManager("inMemoryEventCacheManager").getCache("inMemoryEventCache");
>>>         } else {
>>>             inMemoryEventCacheInit = true;
>>>             return manager.<Integer,
>>> SharedMemoryMatchingManager>createCacheBuilder("inMemoryEventCacheManager").setExpiry(CacheConfiguration.ExpiryType.MODIFIED,
>>>                     new
>>> CacheConfiguration.Duration(TimeUnit.DAYS,1000)).setStoreByValue(false).build();
>>>         }
>>>
>>> --
>>> Thanks
>>> /subash
>>>
>>> *Subash Chaturanga*
>>> Senior Software Engineer & Lead WSO2 Governance Registry
>>> Platform TG; WSO2 Inc. http://wso2.com
>>> Contact:
>>> email: [email protected]
>>> blog:  http://subashsdm.blogspot.com/
>>> twitter: @subash89
>>> phone: +9477 2225922
>>> Lean . Enterprise . Middleware
>>>
>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * <http://www.apache.org/>*
>> *email: **[email protected]* <[email protected]>
>> * cell: +94 77 3320919 <%2B94%2077%203320919> blog: *
>> *http://blog.afkham.org* <http://blog.afkham.org>
>> *twitter: **http://twitter.com/afkham_azeez*
>> <http://twitter.com/afkham_azeez>
>> * linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> <http://lk.linkedin.com/in/afkhamazeez>*
>>
>>
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> Thanks
> /subash
>
> *Subash Chaturanga*
> Senior Software Engineer & Lead WSO2 Governance Registry
> Platform TG; WSO2 Inc. http://wso2.com
> Contact:
> email: [email protected]
> blog:  http://subashsdm.blogspot.com/
> twitter: @subash89
> phone: +9477 2225922
> Lean . Enterprise . Middleware
>



-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* <http://www.apache.org/>*
*email: **[email protected]* <[email protected]>
* cell: +94 77 3320919 blog: **http://blog.afkham.org*
<http://blog.afkham.org>
*twitter: **http://twitter.com/afkham_azeez*
<http://twitter.com/afkham_azeez>
* linked-in: **http://lk.linkedin.com/in/afkhamazeez
<http://lk.linkedin.com/in/afkhamazeez>*

*Lean . Enterprise . Middleware*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to