Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qiushiyan/gcache
a distributed cache for golang
https://github.com/qiushiyan/gcache
Last synced: about 1 month ago
JSON representation
a distributed cache for golang
- Host: GitHub
- URL: https://github.com/qiushiyan/gcache
- Owner: qiushiyan
- Created: 2024-01-11T21:31:54.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-18T17:11:45.000Z (11 months ago)
- Last Synced: 2024-06-21T20:07:18.142Z (6 months ago)
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gcache
gcache is a distributed cache and cache-filling library for golang.
# Usage and example log
```
❯ ./run.sh
2024/01/15 21:37:11 frontend server is running at http://localhost:9999
>>> start test
2024/01/15 21:37:13 http://localhost:8003 cache miss for local cache []
2024/01/15 21:37:13 http://localhost:8003 cache miss for local cache []
2024/01/15 21:37:13 http://localhost:8003 cache miss for local cache []
2024/01/15 21:37:13 INFO [Server http://localhost:8003] http://localhost:8003 pick peer http://localhost:8001
2024/01/15 21:37:13 INFO [Server http://localhost:8001] method=GET path=/_gcache/scores/Jack
2024/01/15 21:37:13 http://localhost:8001 cache miss for local cache []
2024/01/15 21:37:13 INFO [Server http://localhost:8001] peer is self
2024/01/15 21:37:13 http://localhost:8001 fetch from getter func []
2024/01/15 21:37:13 http://localhost:8001 sync value to local cache []
2024/01/15 21:37:13 http://localhost:8001 returning value: [589]
client sending out value:"589"
2024/01/15 21:37:13 http://localhost:8003 sync value to local cache []
2024/01/15 21:37:13 http://localhost:8003 returning value: [589]
2024/01/15 21:37:13 http://localhost:8003 returning value: [589]
2024/01/15 21:37:13 http://localhost:8003 returning value: [589]
{"data":"NTg5","error":null}
{"data":"NTg5","error":null}
{"data":"NTg5","error":null}
```