mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-05-04 01:49:58 +08:00
* !44 comment * !39 添加下行日志打印 * !36 扩展计价领域模型 * !35 webui 初步成型 * !34 webui 初步成型
This commit is contained in:
@@ -10,6 +10,10 @@ public final class CacheConstants {
|
||||
|
||||
public static final String PILE_CACHE = "piles";
|
||||
|
||||
public static final String GUN_CACHE = "guns";
|
||||
|
||||
public static final String PILE_SESSION_CACHE = "pileSessions";
|
||||
|
||||
public static final String ATTRIBUTES_CACHE = "attributes";
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.io.Serializable;
|
||||
public interface VersionedCacheKey extends Serializable {
|
||||
|
||||
default boolean isVersioned() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public abstract class VersionedRedisCache<K extends VersionedCacheKey, V extends
|
||||
|
||||
@Override
|
||||
protected byte[] doGet(K key, RedisConnection connection) {
|
||||
if (!key.isVersioned()) {
|
||||
if (key.isVersioned()) {
|
||||
return super.doGet(key, connection);
|
||||
}
|
||||
byte[] rawKey = getRawKey(key);
|
||||
@@ -79,7 +79,7 @@ public abstract class VersionedRedisCache<K extends VersionedCacheKey, V extends
|
||||
|
||||
@Override
|
||||
public void put(K key, V value) {
|
||||
if (!key.isVersioned()) {
|
||||
if (key.isVersioned()) {
|
||||
super.put(key, value);
|
||||
return;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public abstract class VersionedRedisCache<K extends VersionedCacheKey, V extends
|
||||
|
||||
@Override
|
||||
public void put(K key, V value, RedisConnection connection) {
|
||||
if (!key.isVersioned()) {
|
||||
if (key.isVersioned()) {
|
||||
super.put(key, value, connection); // because scripting commands are not supported in transaction mode
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user