org.springframework.cache.interceptor

## Class SimpleCacheErrorHandler

- java.lang.Object
- - org.springframework.cache.interceptor.SimpleCacheErrorHandler

- All Implemented Interfaces:
    CacheErrorHandler

      public class SimpleCacheErrorHandler
      extends Object
      implements CacheErrorHandler

  A simple `CacheErrorHandler` that does not handle the exception at all, simply throwing it back at the client.
  Since:
    4.1
  Author:
    Stephane Nicoll

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleCacheErrorHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleCacheClearError(RuntimeException exception, Cache cache)` Handle the given runtime exception thrown by the cache provider when clearing the specified `Cache`, possibly rethrowing it as a fatal exception.
    `void` | `handleCacheEvictError(RuntimeException exception, Cache cache, Object key)` Handle the given runtime exception thrown by the cache provider when clearing an item with the specified `key`, possibly rethrowing it as a fatal exception.
    `void` | `handleCacheGetError(RuntimeException exception, Cache cache, Object key)` Handle the given runtime exception thrown by the cache provider when retrieving an item with the specified `key`, possibly rethrowing it as a fatal exception.
    `void` | `handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value)` Handle the given runtime exception thrown by the cache provider when updating an item with the specified `key` and `value`, possibly rethrowing it as a fatal exception.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleCacheErrorHandler

          public SimpleCacheErrorHandler()

  - ### Method Detail

    - #### handleCacheGetError

          public void handleCacheGetError(RuntimeException exception,
                                          Cache cache,
                                          Object key)

      Description copied from interface: `CacheErrorHandler`
      Handle the given runtime exception thrown by the cache provider when retrieving an item with the specified `key`, possibly rethrowing it as a fatal exception.
      Specified by:
        `handleCacheGetError` in interface `CacheErrorHandler`
      Parameters:
        `exception` - the exception thrown by the cache provider
        `cache` - the cache
        `key` - the key used to get the item
      See Also:
        `Cache.get(Object)`

    - #### handleCachePutError

          public void handleCachePutError(RuntimeException exception,
                                          Cache cache,
                                          Object key,
                                          @Nullable
                                          Object value)

      Description copied from interface: `CacheErrorHandler`
      Handle the given runtime exception thrown by the cache provider when updating an item with the specified `key` and `value`, possibly rethrowing it as a fatal exception.
      Specified by:
        `handleCachePutError` in interface `CacheErrorHandler`
      Parameters:
        `exception` - the exception thrown by the cache provider
        `cache` - the cache
        `key` - the key used to update the item
        `value` - the value to associate with the key
      See Also:
        `Cache.put(Object, Object)`

    - #### handleCacheEvictError

          public void handleCacheEvictError(RuntimeException exception,
                                            Cache cache,
                                            Object key)

      Description copied from interface: `CacheErrorHandler`
      Handle the given runtime exception thrown by the cache provider when clearing an item with the specified `key`, possibly rethrowing it as a fatal exception.
      Specified by:
        `handleCacheEvictError` in interface `CacheErrorHandler`
      Parameters:
        `exception` - the exception thrown by the cache provider
        `cache` - the cache
        `key` - the key used to clear the item

    - #### handleCacheClearError

          public void handleCacheClearError(RuntimeException exception,
                                            Cache cache)

      Description copied from interface: `CacheErrorHandler`
      Handle the given runtime exception thrown by the cache provider when clearing the specified `Cache`, possibly rethrowing it as a fatal exception.
      Specified by:
        `handleCacheClearError` in interface `CacheErrorHandler`
      Parameters:
        `exception` - the exception thrown by the cache provider
        `cache` - the cache to clear