Skip to content

Cache get error handler execute twice #681

@fureq

Description

@fureq

Describe the bug
During getting elements from cache, annotated by @Cacheable on FeignClient, cache get error handler execute twice.
It looks like it is caused by change #608. The flow seems to be as follows:

-> CacheInterceptor
   -> CacheAspectSupport#execute:402 (findCachedItem)
      -> handleCacheGetError 
   -> CacheAspectSupport#execute:421 (invokeOperation)
      -> FeignCachingInvocationHandlerFactory#create:53 (cacheInterceptor.invoke)
         -> CacheAspectSupport#execute:402 (findCachedItem) 
            -> handleCacheGetError

Affected spring cloud version: 2021.0.0

Sample
Sample application that reproduces the problem: https://github.com/fureq/spring-feign-bug. Details are described in readme.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions