JCache TouchedExpiryPolicy

This post explains TouchedExpiryPolicy with simple example. TouchedExpiryPolicy is an expiry policy used to inform cache to remove entries which has exceeded its presence since last modification (which includes creation, access and update) Main Code 1 import java.util.Iterator; 2 3 import javax.cache.Cache; 4 import javax.cache.Cache.Entry; 5 import javax.cache.CacheManager; 6 import javax.cache.Caching; 7 import javax.cache.configuration.Factory; 8…… Continue reading JCache TouchedExpiryPolicy

JCache ModifiedExpiryPolicy

This post explains ModifiedExpiryPolicy with simple example. ModifiedExpiryPolicy is an expiry policy used to inform cache to remove entries which has exceeded its presence since last modification (which includes creation and update) Main Code 1 import java.util.Iterator; 2 3 import javax.cache.Cache; 4 import javax.cache.Cache.Entry; 5 import javax.cache.CacheManager; 6 import javax.cache.Caching; 7 import javax.cache.configuration.Factory; 8 import…… Continue reading JCache ModifiedExpiryPolicy

JCache Expiry Policy Example

This post explains about JCache’s Expiry policy with an example. Cache’s Expiry policy is used to inform the caching provider when to remove an entry. The below code uses JCache’s CreatedExpiryPolicy as an example. CreatedExpiryPolicy is used to inform the cache provider to remove the entry after a specified time since the entry’s addition to…… Continue reading JCache Expiry Policy Example