Rev 36332 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 36333 2026-04-21 18:08:09
- Author: amit
- Log message:
- Fix IllegalStateException: drop 'unless' when using @Cacheable(sync=true)
Spring Cache rejects @Cacheable with both sync=true AND an 'unless' attribute,
throwing IllegalStateException on every invocation. Surfaced in production log
on smartdukaan — MonitorController.todayPORBM:739 was returning 500 on 40
observed calls this session.
Dropped 'unless'. Caching an occasionally-empty List for 5 min is harmless:
months with no sales produce an empty result, which is cheaper to re-query
after 5 min than to keep special-casing. The real fix driver for sync=true
(stampede protection) is preserved.