|
|
@@ -2,7 +2,7 @@ package com.izouma.nineth.repo;
|
|
|
|
|
|
import com.izouma.nineth.domain.User;
|
|
|
import com.izouma.nineth.security.Authority;
|
|
|
-import org.springframework.cache.annotation.CacheEvict;
|
|
|
+import org.springframework.cache.annotation.CachePut;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
@@ -20,8 +20,8 @@ public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExe
|
|
|
@Query("update User u set u.del = true where u.id = ?1")
|
|
|
void softDelete(Long id);
|
|
|
|
|
|
- @CacheEvict(value = "user", key = "#user.username", allEntries = true)
|
|
|
@NonNull
|
|
|
+ @CachePut(value = "userInfo",key = "#user.id")
|
|
|
User save(@NonNull User user);
|
|
|
|
|
|
@Cacheable("userInfo")
|