I am using @cacheable
in springboot2.0
with EHcache
, but I am not sure if sync=true
is supported?
How to check it?
@Cacheable
allows you to specify the sync
attribute to ensure only a single thread is building the cache value.
How to check:
Access the cached data by sending the two parallel request and modify the data. The second thread should get only updated value.