The sync flag is only considered for a single local cache. As per Javadoc, the sync flag is a hint for the cache provider that may or may not synchronize.
Please check this thread:
https://github.com/spring-projects/spring-data-redis/issues/1670?utm_source=chatgpt.com
Documentation:
This is an optional feature, and your favorite cache library may not support it. All CacheManager implementations provided by the core framework support it. See the documentation of your cache provider for more details.
https://docs.spring.io/spring-framework/reference/integration/cache/annotations.html