package com.hotent.base.manager.impl;

import com.hotent.base.cache.annotation.CacheEvict;
import com.hotent.base.constants.CacheKeyConst;
import com.hotent.base.manager.UserCacheManager;
import org.springframework.stereotype.Service;

/**
 * 用户缓存 服务实现类
 *
 * @author 欧阳高龙
 * @company 广州宏天软件股份有限公司
 * @since 2022/8/22 11:22
 */
@Service
public class UserCacheManagerImpl implements UserCacheManager {

    @Override
    @CacheEvict(value = CacheKeyConst.EIP_UC_USER_ACCOUNT, key = "#userAccount")
    public void delUserDetailsCache(String userAccount) {}
    @Override
    @CacheEvict(value = CacheKeyConst.EIP_UC_USER_NAME, key = "#userAccount")
    public void delUsernamesCache(String userAccount) {}

    /**
     * redis操作：根据自定义key删除缓存
     *
     * @param customKey
     */
    @Override
    @CacheEvict(value = CacheKeyConst.EIP_UC_COUSTOM, key = "#customKey")
    public void delCustomCache(String customKey) {

    }
}
