EvictInterceptor


EvictInterceptor can automatically clear the cache based on the CacheName annotation. The following is the sample code:

@Before(EvictInterceptor.class)
@CacheName("blogList")
public void update() { getModel(Blog.class).update() ; redirect("blog.html");
}
The usage in the above example will clear the cache data whose cacheName is blogList, and the CacheInterceptor in conjunction with it will automatically update the cache data whose cacheName is blogList.