Hi

Why sending it on tomee@? BTW containsKey doesn't trigger expiration, maybe
call get



Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-05-30 11:18 GMT+02:00 hwaastad <[email protected]>:

> Hi,
> starting to test jcache with tomee:
>
> manager.createCache(
>                 cacheName,
>                 new MutableConfiguration()
>                 .setStoreByValue(false)
>                 .setStatisticsEnabled(true)
>                 .setManagementEnabled(true)
>                 .setTypes(String.class, String.class)
>                 .setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new
> Duration(TimeUnit.MILLISECONDS, 10))));
>
> Test:
> cache.put("a", "b");
>         Thread.sleep(5);
>         cache.get("a");
>         Thread.sleep(9); //Thread.sleep(12) is OK
>         Assert.assertFalse(cache.containsKey("a"));
>
> Maybe I've misunderstood, but this one fails.....
> to me, it seems like this policy is equal to AccessExpiryPolicy....
>
> br hw
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/jcs-jcache-and-tomee-tp4669737.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Reply via email to