https://github.com/welllog/cache
https://github.com/welllog/cache
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/welllog/cache
- Owner: welllog
- Created: 2021-01-15T17:13:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-02T07:18:38.000Z (about 3 years ago)
- Last Synced: 2025-03-11T17:47:49.496Z (over 1 year ago)
- Language: Go
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cache
A simple local cache
1. There is no lock competition for reads and writes between slices; locks exist only for reads and writes within the same slice.
2. The expiration time of keys is periodically checked for deletion by a time wheel
3. Cached base datatypes can be synchronized to a file, or loaded from a file
一个简单的本地缓存
1. 分片之间的读写不存在锁的竞争,锁只存在于同一分片内的读写。
2. 通过时间轮定期检查key的过期时间进行删除。
3. 缓存的基础数据类型可以同步到一个文件,或者从文件中加载。