final GeneratedCacheKey cacheKey = cacheKeyGenerator.generateCacheKey(cacheKeyInvocationContext);
final Cache<GeneratedCacheKey, Object> cache = cacheResolver.resolveCache(cacheKeyInvocationContext);
final Object valueToCache = cacheKeyInvocationContext.getValueParameter().getValue();
if (!cachePut.afterInvocation() && valueToCache != null) {
cache.put(cacheKey, valueToCache);
if (getLog().isTraceEnabled()) {
getLog().tracef("Value '%s' cached in cache '%s' with key '%s' before method invocation", valueToCache, cache.getName(), cacheKey);
}
}