Skip to content

Instantly share code, notes, and snippets.

@matthewfrank
Last active May 27, 2017 14:22
Show Gist options
  • Save matthewfrank/84797873672c189823d59eb61c0b37fb to your computer and use it in GitHub Desktop.
Save matthewfrank/84797873672c189823d59eb61c0b37fb to your computer and use it in GitHub Desktop.
@CacheEvict(value = "post-single", key = "#id")
@DeleteMapping("/delete/{id}")
public void deletePostByID(@PathVariable String id) throws PostNotFoundException {
log.info("delete post with id {}", id);
postService.deletePost(id);
}
@CacheEvict(value = "post-top")
@GetMapping("/top/evict")
public void evictTopPosts() {
log.info("Evict post-top");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment