package com.mes.common; import com.mes.controller.dto.UserDTO; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Component; @Component public class CacheUtil { @Cacheable(value="users", key="#id") public UserDTO getCacheData(String id){ return null; } @Cacheable(value="users", key="#userDTO.getUserId()") public UserDTO setCacheData(UserDTO userDTO){ return userDTO; } }