/** * Remove a bean from the cache given its Id. */ void beanCacheApplyInvalidate(Collection<String> keys) { if (beanCache != null) { if (beanLog.isDebugEnabled()) { beanLog.debug(" REMOVE {}({})", cacheName, keys); } beanCache.removeAll(new HashSet<>(keys)); } for (BeanPropertyAssocOne<?> imported : propertiesOneImported) { imported.cacheClear(); } }
/** * Invalidate parts of cache due to SqlUpdate or external modification etc. */ void persistTableIUD(TableIUD tableIUD, CacheChangeSet changeSet) { if (invalidateQueryCache) { changeSet.addInvalidate(desc); return; } if (noCaching) { return; } changeSet.addInvalidate(desc); // inserts don't invalidate the bean cache if (tableIUD.isUpdateOrDelete()) { changeSet.addClearBean(desc); } // any change invalidates the query cache changeSet.addClearQuery(desc); // any change invalidates the collection IDs cache for (BeanPropertyAssocOne<?> imported : propertiesOneImported) { imported.cacheClear(changeSet); } }
/** * Remove a bean from the cache given its Id. */ void beanCacheApplyInvalidate(Collection<String> keys) { if (beanCache != null) { if (beanLog.isDebugEnabled()) { beanLog.debug(" REMOVE {}({})", cacheName, keys); } beanCache.removeAll(new HashSet<>(keys)); } for (BeanPropertyAssocOne<?> imported : propertiesOneImported) { imported.cacheClear(); } }
/** * Invalidate parts of cache due to SqlUpdate or external modification etc. */ void persistTableIUD(TableIUD tableIUD, CacheChangeSet changeSet) { if (invalidateQueryCache) { changeSet.addInvalidate(desc); return; } if (noCaching) { return; } changeSet.addInvalidate(desc); // inserts don't invalidate the bean cache if (tableIUD.isUpdateOrDelete()) { changeSet.addClearBean(desc); } // any change invalidates the query cache changeSet.addClearQuery(desc); // any change invalidates the collection IDs cache for (BeanPropertyAssocOne<?> imported : propertiesOneImported) { imported.cacheClear(changeSet); } }