package com.hotent.base.util;


import com.hotent.base.manager.UserCacheManager;

/**
 * 缓存清空
 */
public class CacheEvictUtil {
    /**
     * 删除缓存的用户详情
     * <p>该方法没有方法体，通过注解在切面中删除缓存数据</p>
     * @param userAccount
     */
    public static void deleteUserDetailsCache(String userAccount) {
        UserCacheManager bean = AppUtil.getBean(UserCacheManager.class);
        bean.delUserDetailsCache(userAccount);
        bean.delUsernamesCache(userAccount);
    }

    public static void deleteComtomDetailsCache(String coustomKey) {
        UserCacheManager bean = AppUtil.getBean(UserCacheManager.class);
        bean.delCustomCache(coustomKey);
    }
}
