Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Apr 2, 2021. It is now read-only.
/kachePublic archive

A simple in memory cache written using go

License

NotificationsYou must be signed in to change notification settings

kasvith/kache

Repository files navigation

A simple and a flexible in memory cache

Build StatusBuild StatusBuild statusGo Report CardHitCountcodecovGitHub

gopher is looking at kache

What is kache

kache aims to develop aredis compatible in memory db withgolang. Currently kache is powered up withRESP Protocol.kache also supports simple text protocol so you can issue commands to kache using netcat or telnet as you please. kache has powered with many features managing a simple codebase with golang.

Roadmap

  • Kache Server
  • Basic Commands as a POC
  • Cluster Mode
  • Pub/Sub Pattern
  • Snapshots of data
  • Kache CLI
  • Client Libraries for popular languages
  • Documentation
  • Security
  • Improved data Structures
  • Website

kache is a compiled program, download the one for your platform and extract the package to a directory you wish.

Go to that directory, open a command prompt and run the kache executable like

  • ./kache if you are onlinux ormac
  • .\kache if you are onwindows

This will start the application and port7088 will be open by default.

Try to opentelnet ornetcat then

$: nc localhost 7088ping

If you get the+PONG kache is working as expected.

Default configuration file can be found inconfig/kache-default.toml

kache can produce logs as you wish, in addition to default format it supports

  • json
  • logfmt

To run with a custom config file do

./kache --config=path/to/config/file.toml

Synopsis

A fast and a flexible in memory database built with go

kache [flags]

Options

      --config string    configuration file  -d, --debug            output debug information  -h, --help             help for kache      --host string      host for running application (default "127.0.0.1")      --logfile string   application log file      --logging          set application logs (default true)      --logtype string   kache can output logs in different formats like json or logfmt. The default one is custom to kache. (default "default")      --maxClients int   max connections can be handled (default 10000)      --maxTimeout int   max timeout for clients(in seconds) (default 120)  -p, --port int         port for running application (default 7088)  -v, --verbose          verbose output

Development

Prerequisites

  • Go 1.10.+

Installingmage

mage is the build tool we use for build kache. To installmage

Setting up workspace

  • Fork the repo
  • Go to yourGOPATH if you don't know about it learn fromhere
  • Create a directory github.com/kasvith
  • Clone the repo into that directory and cd to it

Make sure you have an active internet connection as for the first time it will download some depedencies.

Build the kache

  • mage vendor will install all the dependencies of the project(will take some time)
  • mage kache will produce the binary of the kache inbin directory
  • mage kachecli will produce the binary of the kache-cli inbin directory

Other options

  • mage check will rungofmt,goimports,go vet and all tests with 32 bit platform including
  • mage fmt will run onlygofmt on the code, will warn you when code has format errors
  • mage vet will reports suspicious constructs
  • mage imports will check import errors
  • mage test will run a unit test with defaults
  • mage test386 will run a test in 32-bit mode
  • mage testrace will run a test withrace conditions enabled
  • mage -l for list all commands

Special note : According to your environment executable will be built, for windows users it will need to add.exe to the end of-o flag likego build -o bin/kache.exe ./cmd/kache

Contributions

kache is anopensource project. Contributions are welcome

  • Fork the repo and star it ⭐
  • Open issues 💥
  • Raise PRs for issues ✋
  • Help on documentation 📄
  • Slack

[8]ページ先頭

©2009-2025 Movatter.jp