Files
schemaCheck/src/test/resources/fixtures/tenant/HelperNew.txt
dongzi 30e530c0bf
Some checks failed
Redis序列化结构检查 / redis-schema-check (push) Has been cancelled
feat: 删除pom
2026-07-13 15:54:38 +08:00

27 lines
704 B
Plaintext

package jnpf.util;
import jnpf.model.TenantVO;
public class TenantDbContentCacheHelper {
private static final String CACHE_KEY_PREFIX = "tenant:db:content:";
private RedisUtil redisUtil;
public String buildCacheKey(String encode) {
return CACHE_KEY_PREFIX + encode;
}
public void cacheSuccess(String encode, TenantVO vo, Long expiresAtMs) {
CacheEnvelope envelope = new CacheEnvelope();
envelope.setVo(vo);
envelope.setExpiresAtMs(expiresAtMs);
redisUtil.insert(buildCacheKey(encode), JSON.toJSONString(envelope), 100);
}
public static class CacheEnvelope {
private TenantVO vo;
private Long expiresAtMs;
}
}