Search in sources :

Example 1 with CacheEntryFilter

use of lucee.commons.io.cache.CacheEntryFilter in project Lucee by lucee.

the class CacheUtil method remove.

public static void remove(ConfigWeb config, CacheConnection cc) throws Throwable {
    Cache c = cc.getInstance(config);
    // FUTURE no reflection needed
    Method remove = null;
    try {
        remove = c.getClass().getMethod("remove", new Class[0]);
    } catch (Exception ioe) {
        c.remove((CacheEntryFilter) null);
        return;
    }
    try {
        remove.invoke(c, new Object[0]);
    } catch (InvocationTargetException e) {
        throw e.getTargetException();
    }
}
Also used : CacheEntryFilter(lucee.commons.io.cache.CacheEntryFilter) Method(java.lang.reflect.Method) IOException(java.io.IOException) CacheException(lucee.commons.io.cache.exp.CacheException) InvocationTargetException(java.lang.reflect.InvocationTargetException) InvocationTargetException(java.lang.reflect.InvocationTargetException) Cache(lucee.commons.io.cache.Cache)

Aggregations

IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1 Cache (lucee.commons.io.cache.Cache)1 CacheEntryFilter (lucee.commons.io.cache.CacheEntryFilter)1 CacheException (lucee.commons.io.cache.exp.CacheException)1