package com.muyu.enterprise.cache;

import com.muyu.common.cache.CacheAbsBasic;
import com.muyu.domain.MessageValue;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 缓存服务
 * @version 1.0
 * @Author xie ya ru
 * @Date 2024/9/29 20:04
 * @注释
 */
@Component
public class MessageValueCacheService extends CacheAbsBasic<String, List<MessageValue>>{

    /**
     *  前缀
     * @return
     */
    @Override
    public String keyPre() {
        return "messageValue:info:";
    }


    @Override
    public String encode(String key) {
        return super.encode(key);
    }


    /**
     * 解密
     * @param key 缓存建
     * @return
     */
    @Override
    public String decode(String key) {
        return key.replace("messageValue:info:","");
    }
}
