Skip to content

Commit 9db31fd

Browse files
committed
prevent cache key conflict
1 parent 3eb5b9e commit 9db31fd

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/main/java/vc/config/live_feed/LiveFeedRepository.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public LiveFeedRepository(final Jdbi jdbi) {
2222
this.jdbi = jdbi;
2323
}
2424

25-
@Cacheable(cacheId)
25+
@Cacheable(value = cacheId, key = "#root.methodName")
2626
public List<LiveFeedConfig> getAll() {
2727
try (var handle = jdbi.open()) {
2828
return handle.select("SELECT * FROM live_feed_config")
@@ -34,7 +34,7 @@ public List<LiveFeedConfig> getAll() {
3434
}
3535
}
3636

37-
@Cacheable(cacheId)
37+
@Cacheable(value = cacheId, key = "#root.methodName")
3838
public List<LiveFeedConfig> getByLiveChatEnabled() {
3939
try (var handle = jdbi.open()) {
4040
return handle.select("SELECT * FROM live_feed_config WHERE live_chat_enabled = 1")
@@ -46,7 +46,7 @@ public List<LiveFeedConfig> getByLiveChatEnabled() {
4646
}
4747
}
4848

49-
@Cacheable(cacheId)
49+
@Cacheable(value = cacheId, key = "#root.methodName")
5050
public List<LiveFeedConfig> getByLiveConnectionsEnabled() {
5151
try (var handle = jdbi.open()) {
5252
return handle.select("SELECT * FROM live_feed_config WHERE live_connections_enabled = 1")

src/main/java/vc/config/watch/GuildChatWatchRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public GuildChatWatchRepository(final Jdbi jdbi) {
2121
this.jdbi = jdbi;
2222
}
2323

24-
@Cacheable(cacheId)
24+
@Cacheable(value = cacheId, key = "#root.methodName")
2525
public List<GuildChatWatchConfig> getAll() {
2626
try (var handle = jdbi.open()) {
2727
return handle.select("SELECT * FROM guild_chat_watch_config")

src/main/java/vc/config/watch/GuildPlayerWatchRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public GuildPlayerWatchRepository(final Jdbi jdbi) {
2222
this.jdbi = jdbi;
2323
}
2424

25-
@Cacheable(cacheId)
25+
@Cacheable(value = cacheId, key = "#root.methodName")
2626
public List<GuildPlayerWatchConfig> getAll() {
2727
try (var handle = jdbi.open()) {
2828
return handle.select("SELECT * FROM guild_player_watch_config")

src/main/java/vc/config/watch/UserChatWatchRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public UserChatWatchRepository(final Jdbi jdbi) {
2121
this.jdbi = jdbi;
2222
}
2323

24-
@Cacheable(cacheId)
24+
@Cacheable(value = cacheId, key = "#root.methodName")
2525
public List<UserChatWatchConfig> getAll() {
2626
try (var handle = jdbi.open()) {
2727
return handle.select("SELECT * FROM user_chat_watch_config")

src/main/java/vc/config/watch/UserPlayerWatchRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public UserPlayerWatchRepository(final Jdbi jdbi) {
2323
this.jdbi = jdbi;
2424
}
2525

26-
@Cacheable(cacheId)
26+
@Cacheable(value = cacheId, key = "#root.methodName")
2727
public List<UserPlayerWatchConfig> getAll() {
2828
try (var handle = jdbi.open()) {
2929
return handle.select("SELECT * FROM user_player_watch_config")

0 commit comments

Comments
 (0)