rom.we
rom.we

Reputation: 15

Redisson local cache use

I have two questions regarding the reddison client:

  1. Does redisson support automatic synchronization of local cache with remote redis cache (when remote cache data change or invalidate)?

  2. I understand that redisson supports data partitioning only in pro edition but isn't that feature already supported OOTB by redis cluster mode? Am I missing something here?

Upvotes: 0

Views: 4815

Answers (2)

DALDEI
DALDEI

Reputation: 3732

Re: "local cache truely local" -- I think you can just use a java Map, initially populate it with a RMap contents then from then on just serve your requests from the 'truely local' map in memory.

Upvotes: 0

Nikita Koksharov
Nikita Koksharov

Reputation: 10813

Answering to your questions:

  1. RLocalCachedMap has two synchronization strategies:
    INVALIDATE - Used by default. Invalidate cache entry across all RLocalCachedMap instances on map entry change.
    UPDATE - Update cache entry across all LocalCachedMap instances on map entry change.

  2. Right, all Redisson objects works also in cluster mode. Each object tied to some Redis node and its content always remain only on the same Redis node and not distributed. If your object couldn't fit in single Redis node then you need to use data partitioning feature. This feature evenly distributes content of object across multiple Redis nodes in cluster.

Upvotes: 1

Related Questions