| 1234567891011121314151617181920212223 |
- package com.izouma.nineth.service;
- import org.springframework.cache.annotation.CacheEvict;
- import org.springframework.stereotype.Service;
- @Service
- public class CacheService {
- @CacheEvict(value = "collection", allEntries = true)
- public void clearCollection() {
- }
- @CacheEvict(value = "collection", key = "#id")
- public void clearCollection(Long id) {
- }
- @CacheEvict(value = "user", allEntries = true)
- public void clearUser() {
- }
- @CacheEvict(value = "user", key = "#username")
- public void clearUser(String username) {
- }
- }
|