3秒缓存

This commit is contained in:
2024-12-26 20:56:33 +08:00
parent b39a7f6dc5
commit bedbdcb0d7
2 changed files with 21 additions and 3 deletions

View File

@@ -84,6 +84,11 @@ public class RedisUtils {
return this.fromJson(jsonStr, clazz);
}
public <T> T getObjectDate(String key, Class<T> clazz) {
String jsonStr = get(key);
return this.fromJson(jsonStr, clazz);
}
public String getDate(String key, String method) {
if (!this.hasKey(key)) {
try {