Support caching POJO as Hash in Redis with Spring Cache [DATAREDIS-466] #1045
I tried to use Redis as a cache layer between my application and MySQL database, and currently I'm using RedisCacheManager with Spring's cache support. The POJO instance is serialized as JSON String for caching.
But due to the reasons for better space utilization as well as faster individual field update for an object, I'd prefer to save data as Hash in Redis. So I'm wondering if I can do this with cached data, if possibly we can configure RedisCacheManager to save cache value as Hash. Two things I"m not sure so far,
No further details from DATAREDIS-466
The text was updated successfully, but these errors were encountered:
Christoph Strobl commented
After spending quite some time trying to flesh out the details how this could potentially work we decided that we're not going to add this feature.
While mapping a single complex object (like a
Collection / Simple Type as Hash
(+) still stored in a hash
Collection as List / Simple Type as String
(+) idiomatic data structure use
In case we’ve been missing something or there are convincing arguments to include this feature please feel free to comment on the issue or even better provide a PR with a working solution