fix: cache evict when updating

This commit is contained in:
Jose
2026-03-04 22:55:07 +01:00
parent db27bcc1f7
commit 6949d8e083

View File

@@ -14,6 +14,7 @@
import net.miarma.backlib.dto.UserDto;
import net.miarma.backlib.dto.UserWithCredentialDto;
import net.miarma.backlib.exception.NotFoundException;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
@@ -203,6 +204,7 @@
.toList();
}
@CacheEvict(value = "members", allEntries = true)
public MemberDto update(UUID userId, MemberDto changes) {
try {
huertosWebClient.updateUser(userId, new UserWithCredentialDto(changes.user(), changes.account()));