All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.base4j.cache.utils.CacheCodeUtils Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.base4j.cache.utils;

/**
 * @author FY
 */
public class CacheCodeUtils {

    /** 缓存KEY的组分隔符 */
    public static final String KEY_SEPARATOR_SIGN = ":";


    /**
     * 创建缓存 redis key
     * @param region 缓存的region name
     * @param key 标志位
     * @return 完整KEY - region:key - string
     */
    public static String createRedisKey(String region, Object key) {
        return String.format("%s%s%s", region, KEY_SEPARATOR_SIGN, key.toString());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy