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