Code example for Cache

Methods: cleanUp

0
	 * @see com.solutionary.cache.PortletCacheInterface#cleanUp() 
	 */ 
	 
	@ManagedOperation(description="Flush Cache") 
	public void cleanUp(){ 
		cache.cleanUp();
	} 
	 
	/* (non-Javadoc) 
	 * @see com.solutionary.cache.PortletCacheInterface#initialize() 
	 */ 
	 
	@PostConstruct 
	  public void initialize() { 
		PortletCacheListener listener = new PortletCacheListener();
		cache = CacheBuilder.newBuilder().concurrencyLevel(4).softValues().maximumSize(60).removalListener(listener).expireAfterWrite(2, TimeUnit.MINUTES).build();
				 
	  } 
 
	/* (non-Javadoc)