SpringBoot & Caching
- Anand Nerurkar
- Nov 4, 2023
- 1 min read



we need to enable caching as below- we could write our configuration class and enable cacjing or we can enable caching in springboot main application class
springboot starter cache in classpath

2.
Below are the sample cache annotation which we can use /map for the fetching record
@Cacheable ---
used for the fetch operation.it always check first in cache if found return data else hit db get data,populate cache and return data.

@CachePut
used for update operation.This is always executing body and then update cache.

@CacheEvict
to remove cache information

@Caching -
used to manage multiple cache

@CacheConfig- at class level

Comments