MrLiuFang opened a new issue, #12836:
URL: https://github.com/apache/dubbo/issues/12836
### Environment
* Dubbo version: 3.2.4
* Operating System version: ubuntu
* Java version: 17
* spring boot 3.1.2
### Steps to reproduce this issue
在interface 上使用@Cacheable (org.springframework.cache.annotation.Cacheable)的问题
**生产者 interface:**
```
@Cacheable(value = FileDefinition.CACHE_KEY_URL_MULTIPLE,key = "#tableId
+ '-' + #fileFieldName + '-' +#tableName")
public Map<Long,String> getUrl(@NotNull Long tableId,@NotBlank String
fileFieldName,@NotBlank String tableName);
```
**消费者调用方:**
```
fileExposeService.getUrlSingle(1L, UserPo.TABLE_NAME,
UserDefinition.PROFILE_PHOTO_FIELD_NAME);
fileExposeService.getUrlSingle(2L, UserPo.TABLE_NAME,
UserDefinition.PROFILE_PHOTO_FIELD_NAME);
fileExposeService.getUrlSingle(3L, UserPo.TABLE_NAME,
UserDefinition.PROFILE_PHOTO_FIELD_NAME);
```
**在redis中缓存的数据如下:`(只有第一次远程调用可以正常缓存数据,第二,三次远程调用后的均无法正常缓存数据)`**

```
第一次远程调用能产生redis key为:(urlSingle::1-t_user-profilePhoto) 的缓存
fileExposeService.getUrlSingle(1L, UserPo.TABLE_NAME,
UserDefinition.PROFILE_PHOTO_FIELD_NAME);
第二,三次远程调用均产生了错误的redis key为:(urlSingle::null-null-null) 的缓存
fileExposeService.getUrlSingle(2L, UserPo.TABLE_NAME,
UserDefinition.PROFILE_PHOTO_FIELD_NAME);
fileExposeService.getUrlSingle(3L, UserPo.TABLE_NAME,
UserDefinition.PROFILE_PHOTO_FIELD_NAME);
第二,三次远程调用产生的redis key 应为:(urlSingle::2-t_user-profilePhoto)
(urlSingle::3-t_user-profilePhoto)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]