diff --git a/app/src/main/java/com/example/app/PeanutsService.java b/app/src/main/java/com/example/app/PeanutsService.java index 2602274..baeca74 100644 --- a/app/src/main/java/com/example/app/PeanutsService.java +++ b/app/src/main/java/com/example/app/PeanutsService.java @@ -16,7 +16,7 @@ public Peanuts getPeanutsById(Long id) { return repository.findById(id).orElse(null); } - @CachePut(value = "peanuts", key = "#peanuts.id") + @CachePut(value = "peanuts", key = "#result.id") public Peanuts savePeanuts(Peanuts peanuts) { return repository.save(peanuts); }