Browse Source

Merge branch '6.0.x'

# Conflicts:
#	spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java
pull/30459/head
Juergen Hoeller 2 years ago
parent
commit
27f9473422
  1. 8
      spring-context/src/main/java/org/springframework/cache/interceptor/AbstractCacheInvoker.java
  2. 8
      spring-context/src/main/java/org/springframework/cache/support/SimpleCacheManager.java

8
spring-context/src/main/java/org/springframework/cache/interceptor/AbstractCacheInvoker.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -82,12 +82,12 @@ public abstract class AbstractCacheInvoker { @@ -82,12 +82,12 @@ public abstract class AbstractCacheInvoker {
* Execute {@link Cache#put(Object, Object)} on the specified {@link Cache}
* and invoke the error handler if an exception occurs.
*/
protected void doPut(Cache cache, Object key, @Nullable Object result) {
protected void doPut(Cache cache, Object key, @Nullable Object value) {
try {
cache.put(key, result);
cache.put(key, value);
}
catch (RuntimeException ex) {
getErrorHandler().handleCachePutError(ex, cache, key, result);
getErrorHandler().handleCachePutError(ex, cache, key, value);
}
}

8
spring-context/src/main/java/org/springframework/cache/support/SimpleCacheManager.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -24,14 +24,16 @@ import org.springframework.cache.Cache; @@ -24,14 +24,16 @@ import org.springframework.cache.Cache;
/**
* Simple cache manager working against a given collection of caches.
* Useful for testing or simple caching declarations.
* <p>
* When using this implementation directly, i.e. not via a regular
*
* <p>When using this implementation directly, i.e. not via a regular
* bean registration, {@link #initializeCaches()} should be invoked
* to initialize its internal state once the
* {@linkplain #setCaches(Collection) caches have been provided}.
*
* @author Costin Leau
* @since 3.1
* @see NoOpCache
* @see org.springframework.cache.concurrent.ConcurrentMapCache
*/
public class SimpleCacheManager extends AbstractCacheManager {

Loading…
Cancel
Save