• This repository has been archived on 02/Apr/2021
  • Stars
    star
    347
  • Rank 122,141 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple in memory cache written using go

kache

A simple and a flexible in memory cache

Build Status Build Status Build status Go Report Card HitCount codecov GitHub

gopher is looking at kache

What is kache

kache aims to develop a redis compatible in memory db with golang. Currently kache is powered up with RESP 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

Running kache

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 on linux or mac
  • .\kache if you are on windows

This will start the application and port 7088 will be open by default.

Try to open telnet or netcat then

$: nc localhost 7088
ping

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

Default configuration file can be found in config/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.+

Installing mage

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

Setting up workspace

  • Fork the repo
  • Go to your GOPATH if you don't know about it learn from here
  • 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 in bin directory
  • mage kachecli will produce the binary of the kache-cli in bin directory

Other options

  • mage check will run gofmt, goimports, go vet and all tests with 32 bit platform including
  • mage fmt will run only gofmt 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 with race 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 like go build -o bin/kache.exe ./cmd/kache

Contributions

kache is an opensource project. Contributions are welcome

  • Fork the repo and star it โญ
  • Open issues ๐Ÿ’ฅ
  • Raise PRs for issues โœ‹
  • Help on documentation ๐Ÿ“„
  • Slack

More Repositories

1

simplelb

World's most dumbest Load Balancer
Go
424
star
2

express-mongo-jwt-boilerplate

Express Mongo JsonWebToken boilerplate
JavaScript
102
star
3

teks

Easily get custom go template based outputs to your command-line tool. Like in docker/kubernetes
Go
42
star
4

vue-spa-multiple-layouts-example

Sample application that shows how to use multiple layouts in single SPA app
JavaScript
41
star
5

hackerrank-dl

Download submissions from a HackerRank contest and sort them according to programming languages
Go
24
star
6

simple-microservice-example

A very simple microservice example with NodeJS, Python and Docker
JavaScript
15
star
7

javafxrealtimechartsdemo

A demo for JavaFX realtime charts
Java
8
star
8

tic-tac-toe

Elixir tic-tac-toe
Elixir
6
star
9

hermes

A tiny, fast MQTT broker
Rust
6
star
10

nestjs-dataloader-example

NestJS GraphQL Dataloader integration example
TypeScript
5
star
11

typescript-express-jwt-knex-boilerplate

Typescript Express JWT Knex Boilerplate
TypeScript
4
star
12

wso2-am-ci-cd-demo

Demo files for WSO2 APIM CI/CD workflow
Shell
4
star
13

node-przelewy24

NodeJS Library for przelewy24 Moved to https://github.com/ingameltd/node-przelewy24
TypeScript
4
star
14

terminal-clock

A digital clock that displays time in linux terminal
C
3
star
15

mp3t

Extract tag info from Mp3 files
Rust
3
star
16

pera-wifi-easy

Simple script for control pera wifi in a linux env :)
Shell
3
star
17

jenkins-test

Java
2
star
18

Fractals

A simple fractal project using Java
Java
2
star
19

blog

SCSS
2
star
20

vehicle-tracking-system

A simple vehicle tracking system
PHP
2
star
21

kasvith.github.io

HTML
2
star
22

nuxt-k8s-test

Vue
2
star
23

joomla-dropbox

A simple dropbox plugin for Joomla! 4
PHP
2
star
24

AggregateParallelTasks

JavaFX aggregate parallel tasks
Java
2
star
25

test-repo

A test project
Java
1
star
26

congenial-sniffle

Shell
1
star
27

acme

acme api
1
star
28

githubmailman

1
star
29

sdl-book

Completing SDL book examples with modern C++
CMake
1
star
30

appa

appa is a lightweight API gateway written in Rust
Rust
1
star
31

php-dropbox-api

Complete Dropbox API for PHP
1
star
32

Cute2D

A cute 2D game engine
1
star
33

openweathermap-ballerina

Open Weather Map connector for ballerina
Ballerina
1
star
34

plyr-react-nextjs-example

CSS
1
star
35

naive_bayes

Simple Naive Bayes
Python
1
star
36

ghnotif

Poke you when notifications are left untouched
1
star
37

BloodDonationManagement

Blood donation management system with PHP
PHP
1
star
38

dndkit-collapsible-reproduce

Created with CodeSandbox
TypeScript
1
star
39

project_euler

C
1
star
40

play-with-rsc

TypeScript
1
star
41

media-manager

โ˜๏ธ A cloud based media manager to manage media files integrated with Dropbox, Google Drive etc.
Vue
1
star
42

fruits-360-experiments

Jupyter Notebook
1
star
43

sgrep

A simple grep program written with Deno
TypeScript
1
star
44

ballerina-mailgun

Mailgun client for ballerina
Ballerina
1
star
45

the-art-of-elixir

1
star
46

cibf

An app that help folks to easily participate Colombo International Bookfair
TypeScript
1
star