(root)/ – Rev 36328
Rev 36327 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 36328 2026-04-21 14:55:02
- Author: amit
- Log message:
- Remove @Cacheable from getFirstBillingDate — LocalDateTime + Redis incompatibility
The redisOneDayCacheManager (CacheConfig.java:109-116) is configured with
enableDefaultTyping(NON_FINAL, JsonTypeInfo.As.PROPERTY). That embeds type info
as a JSON object property, which is only valid for objects ({}) — not arrays.
JavaTimeModule serializes LocalDateTime as an array ([y,m,d,h,m,s]), so the
write drops type metadata and reads fail with MismatchedInputException
('need JSON String that contains type id').
The underlying NamedQuery (Order.selectFirstBillingByRetailer) uses MIN() on
the idx_order_customer_billing composite index — EXPLAIN reports 'Select tables
optimized away'. Per-call latency is microseconds even uncached, so Redis
caching was optimization rather than requirement. Simpler to drop the annotation
than reconfigure the shared cache manager.