@Override public JCacheOperation<?> getCacheOperation(Method method, @Nullable Class<?> targetClass) { MethodClassKey cacheKey = new MethodClassKey(method, targetClass); Object cached = this.cache.get(cacheKey); if (cached != null) { return (cached != NULL_CACHING_ATTRIBUTE ? (JCacheOperation<?>) cached : null); } else { JCacheOperation<?> operation = computeCacheOperation(method, targetClass); if (operation != null) { if (logger.isDebugEnabled()) { logger.debug("Adding cacheable method '" + method.getName() + "' with operation: " + operation); } this.cache.put(cacheKey, operation); } else { this.cache.put(cacheKey, NULL_CACHING_ATTRIBUTE); } return operation; } }
@Override public JCacheOperation<?> getCacheOperation(Method method, @Nullable Class<?> targetClass) { MethodClassKey cacheKey = new MethodClassKey(method, targetClass); Object cached = this.cache.get(cacheKey); if (cached != null) { return (cached != NULL_CACHING_ATTRIBUTE ? (JCacheOperation<?>) cached : null); } else { JCacheOperation<?> operation = computeCacheOperation(method, targetClass); if (operation != null) { if (logger.isDebugEnabled()) { logger.debug("Adding cacheable method '" + method.getName() + "' with operation: " + operation); } this.cache.put(cacheKey, operation); } else { this.cache.put(cacheKey, NULL_CACHING_ATTRIBUTE); } return operation; } }
@Override public JCacheOperation<?> getCacheOperation(Method method, Class<?> targetClass) { MethodClassKey cacheKey = new MethodClassKey(method, targetClass); Object cached = this.cache.get(cacheKey); if (cached != null) { return (cached != NULL_CACHING_ATTRIBUTE ? (JCacheOperation<?>) cached : null); } else { JCacheOperation<?> operation = computeCacheOperation(method, targetClass); if (operation != null) { if (logger.isDebugEnabled()) { logger.debug("Adding cacheable method '" + method.getName() + "' with operation: " + operation); } this.cache.put(cacheKey, operation); } else { this.cache.put(cacheKey, NULL_CACHING_ATTRIBUTE); } return operation; } }