go-local-cache

module
v0.0.0-...-1a87dc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: MIT

README

go-local-cache

Implement a local cache in Go that meets the following requirements:

  1. Can Get a value from the local cache using a key
  2. Can Set a key/value pair to the local cache
  3. Keys are string type and value can be any types
  4. Item in the local cache expires in 30 seconds
  5. Set will overwrite the existed item and reset the timer (when the key is the same)

Also meets other requirements:

  • Separate interface & implementation in different files
  • Write unit test for each methods in interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL