Skip to content

Commit

Permalink
Evict user login cache for couchbase (#28039)
Browse files Browse the repository at this point in the history
* Isue #27972 last tests fix

* Isue #27972 last tests fix

* Isue #27972 last tests fix
  • Loading branch information
kamilkrzywanski authored Dec 1, 2024
1 parent a137788 commit bc6f571
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ import org.slf4j.LoggerFactory;
<%_ } _%>
<%_ if (cacheProviderAny) { _%>
import org.springframework.cache.CacheManager;
<%_ if (databaseTypeCouchbase) { _%>
import org.springframework.cache.annotation.CacheEvict;
<%_ } _%>
<%_ } _%>
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _%>
<%_ if (!reactive) { _%>
Expand Down Expand Up @@ -573,6 +576,9 @@ public class UserService {
.map(<%= user.adminUserDto %>::new);
}

<%_ if (databaseTypeCouchbase && cacheProviderAny) { _%>
@CacheEvict(cacheNames = UserRepository.USERS_BY_LOGIN_CACHE, key = "#login")
<%_ } _%>
<%_ if (reactive) { _%>
<%_ if (databaseTypeSql) { _%>
@Transactional
Expand Down

0 comments on commit bc6f571

Please sign in to comment.