https://github.com/PrasannaC/SimpleCache
A simple n-way set associative cache implemented in Go
https://github.com/PrasannaC/SimpleCache
cache go golang linked-list n-way-cache
Last synced: 11 days ago
JSON representation
A simple n-way set associative cache implemented in Go
- Host: GitHub
- URL: https://github.com/PrasannaC/SimpleCache
- Owner: PrasannaC
- Created: 2018-10-31T07:17:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-31T16:51:04.000Z (over 6 years ago)
- Last Synced: 2024-11-13T23:33:12.710Z (6 months ago)
- Topics: cache, go, golang, linked-list, n-way-cache
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-golang-repositories - SimpleCache - way set associative cache implemented in Go (Repositories)
README
# SimpleCache
A simple n-way set associative, LRU cache implemented in Go## Usage
```Go
import "SimpleCache/Cache"var cache Cache.ICache
// To create a cache with 10 sets of length 3 each.
cache = Cache.CreateCache(3, 10)
// The key must be a string
// Value can be any type
cache.Put("Key",value)
cachedValue = cache.Get("key")
```