@@ -44,7 +44,7 @@ public void createTable(long tableIdentifier) {
44
44
@ CheckReturnValue
45
45
public InteractionResult get (long tableIdentifier , String setting ) {
46
46
if (Database .cache != null ) {
47
- String cached = Database .cache .get (tableIdentifier + "-" + setting );
47
+ String cached = Database .cache .get (this + "-" + tableIdentifier + "-" + setting );
48
48
if (cached != null ) return InteractionResult .SUCCESS .setValue (cached );
49
49
}
50
50
@@ -59,7 +59,7 @@ public InteractionResult get(long tableIdentifier, String setting) {
59
59
try (ResultSet resultSet = stmt .executeQuery ()) {
60
60
if (resultSet .next ()) {
61
61
String value = resultSet .getString ("value" );
62
- if (Database .cache != null ) Database .cache .put (tableIdentifier + "-" + setting , value );
62
+ if (Database .cache != null ) Database .cache .put (this + "-" + tableIdentifier + "-" + setting , value );
63
63
return InteractionResult .SUCCESS .setValue (value );
64
64
} else return InteractionResult .NOT_FOUND ;
65
65
}
@@ -97,7 +97,7 @@ public InteractionResult update(long tableIdentifier, String setting, String new
97
97
stmt .setString (2 , setting );
98
98
99
99
if (stmt .executeUpdate () > 0 ) {
100
- if (Database .cache != null ) Database .cache .put (tableIdentifier + "-" + setting , newValue );
100
+ if (Database .cache != null ) Database .cache .put (this + "-" + tableIdentifier + "-" + setting , newValue );
101
101
return InteractionResult .SUCCESS ;
102
102
} else return InteractionResult .NOT_FOUND ;
103
103
} catch (SQLException e ) {
@@ -116,7 +116,7 @@ public InteractionResult delete(long tableIdentifier, String setting) {
116
116
stmt .setString (1 , setting );
117
117
118
118
if (stmt .executeUpdate () > 0 ) {
119
- if (Database .cache != null ) Database .cache .remove (tableIdentifier + "-" + setting );
119
+ if (Database .cache != null ) Database .cache .remove (this + "-" + tableIdentifier + "-" + setting );
120
120
return InteractionResult .SUCCESS ;
121
121
} else return InteractionResult .NOT_FOUND ;
122
122
} catch (SQLException e ) {
0 commit comments