Skip to content

kadnan/GoCache

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Go Cache Server

GoCache is a simple Cache Server based on LRU algorithm which is also used on MemCache.

Setup and Run

  • Clone this repo: https://github.com/kadnan/GoCache.git
  • go run gocached.go lru.go - By Default it runs on port 9000 with the capacity 5.
  • You can also specify port while running: go run gocached.go lru.go -port=9002 -capacity=20

Commands

  • get [keyname] to retrieve a key. If not available it gives a message. For example get name.
  • set [keyname] [value] to set a key. It returns 1. For example set name adnan.

Etcetera

  • This is my first ever Go program and also first ever implementation of LRU Cache Algorithm so do mention mistake where found or come up witha PR request.

  • There is also a sample go client available in the file client.go.

About

A simplest Cache Server based on LRU implementation written in Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages