Skip to content

Commit

Permalink
Merge pull request #196 from ShanePark/#hotfix
Browse files Browse the repository at this point in the history
fix: evict holiday cache when reset info
  • Loading branch information
ShanePark authored Sep 20, 2024
2 parents 1f30cf7 + c99f9a5 commit 1f4f8f7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.tistory.shanepark.dutypark.holiday.service.holidayAPI.HolidayAPI
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.cache.annotation.CacheEvict
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import java.time.LocalDate
Expand Down Expand Up @@ -43,6 +44,7 @@ class HolidayService(
return answer
}

@CacheEvict(value = ["holidays"], allEntries = true)
fun resetHolidayInfo() {
holidayRepository.deleteAll()
holidayMap.clear()
Expand Down

0 comments on commit 1f4f8f7

Please sign in to comment.