Skip to content

i-sevostyanov/cached

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cached

Is an in-memory cache server with a simple text-based protocol.

Features

  • TTL per key (based on BTree index)
  • Dump and Restore from disk
  • Thread-safety
  • Commands:
    • set <key> <value> <ttl>
    • get <key>
    • del <key>
    • stats
    • quit

Why?

For fun and profit :-)

How to use

You need just start a server and connect to it from nc, like this:

nc 127.0.0.1 4000

Set value:

set mykey myvalue 300s
OK

Get value:

get mykey
myvalue

Delete value:

del mykey
OK

Show stats:

stats
Hit: 865, Miss: 24, Size: 853

ToDo

  • Tests and benchmarks
  • Metrics
  • Dump and restore without reflection
  • Build in GitHub Actions

About

Cached is an in-memory cache server with a simple text-based protocol.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published