1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.components.interceptors;
18
19 import org.aopalliance.intercept.MethodInvocation;
20 import org.apache.jetspeed.cache.general.GeneralCache;
21
22 /***
23 * <p>
24 * RemoveFromCacheInterceptor
25 * </p>
26 * <p>
27 *
28 * </p>
29 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
30 * @version $Id: RemoveFromCacheInterceptor.java 516448 2007-03-09 16:25:47Z ate $
31 *
32 */
33 public class RemoveFromCacheInterceptor extends AbstractCacheInterceptor
34 {
35
36 /***
37 * @param cache
38 */
39 public RemoveFromCacheInterceptor( GeneralCache cache )
40 {
41 super(cache);
42 }
43
44 /***
45 *
46 * <p>
47 * doCacheOperation
48 * </p>
49 *
50 * @see org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor#doCacheOperation(org.aopalliance.intercept.MethodInvocation, java.lang.String)
51 * @param mi
52 * @param uniqueKey
53 * @return
54 * @throws Throwable
55 */
56 protected Object doCacheOperation( MethodInvocation mi, String uniqueKey ) throws Throwable
57 {
58 cache.remove(uniqueKey);
59 return mi.proceed();
60 }
61 }