https://github.com/quochungndvt/redis-sync-memory-cache
Using redis to synchronizing memory caches
https://github.com/quochungndvt/redis-sync-memory-cache
cache cache-storage memory-cache redis redis-sync
Last synced: about 2 months ago
JSON representation
Using redis to synchronizing memory caches
- Host: GitHub
- URL: https://github.com/quochungndvt/redis-sync-memory-cache
- Owner: quochungndvt
- License: gpl-3.0
- Created: 2019-06-11T02:54:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T06:44:18.000Z (over 4 years ago)
- Last Synced: 2024-06-19T06:56:47.636Z (10 months ago)
- Topics: cache, cache-storage, memory-cache, redis, redis-sync
- Language: Go
- Size: 51.8 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redis-sync-memory-cache
Using redis to synchronizing memory cachesClassic Redis use case with lots of advantages and incredibly fast but as we know local RAM access is still many times faster than network I/O
BTW memory caches in decentralized system have some challenges
1. Data consistency
2. Data lag between the memory caches and Redis
2. Don’t blow up the network!This module implement Techniques for Synchronizing In-Memory Caches with Redis
\
### Documentation
-------------- [API Reference](https://godoc.org/github.com/quochungndvt/redis-sync-memory-cache/rsmemory)
### Installation
-------------Install using the "go get" command:
go get github.com/quochungndvt/redis-sync-memory-cache/rsmemory
### Examples
-------------try this [example](https://github.com/quochungndvt/redis-sync-memory-cache/tree/master/examples/server)
- server1: go run main.go -port 8081
- server2: go run main.go -port 8082Open in browser
- A: http://localhost:8081/read/1/1
- B: http://localhost:8082/read/1/1
- Update cache http://localhost:8081/write/1/update
refresh A, B and see### Feature
-------------
- Support more Redis type
- Support cache expire