Cache - wuyichen24/spring-microservices-in-action GitHub Wiki
Solution
Redis
Structure
This is the logical structure for Spring interacts with Redis:
- Key: "organization".
- Hash Key: The organization ID.
- Hash Value: The object of Organization class.
For example
Key | Hash Key | Hash Value |
---|---|---|
organization | e254f8c-c442-4ebe-a82a-e2fc1d1ff78a | {"organizationId":"e254f8c-c442-4ebe-a82a-e2fc1d1ff78a","name":"customer-crm-co","contactName":"Mark Balster","contactEmail":"[email protected]","contactPhone":"823-555-1212"} |
In Redis, it stores like
Key | Value |
---|---|
\xac\xed\x00\x05t\x00\x0corganization | (nil) |