public < Result , Param extends Resource > Result execWithoutCacheClear ( Param resource , IUnitOfWork < Result , Param > transaction ) throws WrappedException { CacheAdapter cacheAdapter = getOrCreate ( resource ) ; try { cacheAdapter . ignoreNotifications ( ) ; return transaction . exec ( resource ) ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new WrappedException ( e ) ; } finally { cacheAdapter . listenToNotifications ( ) ; } }
The transaction will be executed . While it is running any semantic state change in the given resource will be ignored and the cache will not be cleared .