Skip to content

Commit

Permalink
Update Scylla cache implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-himanshu committed Oct 23, 2024
1 parent 3b443df commit f468b8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ public void scheduleEventHandlerRefresh() {
}

@Override
@CachePut(value = EVENT_HANDLER_CACHE, key = "#eventHandler.name")
@CachePut(
value = EVENT_HANDLER_CACHE,
key = "#eventHandler.name",
condition = "#eventHandler != null")
public void addEventHandler(EventHandler eventHandler) {
scyllaEventHandlerDAO.addEventHandler(eventHandler);
}

@Override
@CachePut(value = EVENT_HANDLER_CACHE, key = "#eventHandler.name")
@CachePut(
value = EVENT_HANDLER_CACHE,
key = "#eventHandler.name",
condition = "#eventHandler != null")
public void updateEventHandler(EventHandler eventHandler) {
scyllaEventHandlerDAO.updateEventHandler(eventHandler);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ public void scheduleCacheRefresh() {
}

@Override
@CachePut(value = TASK_DEF_CACHE, key = "#taskDef.name")
@CachePut(value = TASK_DEF_CACHE, key = "#taskDef.name", condition = "#taskDef != null")
public TaskDef createTaskDef(TaskDef taskDef) {
scyllaMetadataDAO.createTaskDef(taskDef);
return taskDef;
}

@Override
@CachePut(value = TASK_DEF_CACHE, key = "#taskDef.name")
@CachePut(value = TASK_DEF_CACHE, key = "#taskDef.name", condition = "#taskDef != null")
public TaskDef updateTaskDef(TaskDef taskDef) {
return scyllaMetadataDAO.updateTaskDef(taskDef);
}
Expand Down

0 comments on commit f468b8c

Please sign in to comment.