cache

package
v0.0.0-...-40a7325 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cache exports a Cache interface to manage in-memory caches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Init(cap int) error
	Add(cmd *proto.BotCommand) error
	Get(cmd *proto.Command) (*proto.BotCommand, error)
	Remove(cmd *proto.Command) error
}

Cache represents a cache with basic methods to manage the items in the cache itself.

func Create

func Create(platform string) Cache

Create follows the Factory patterns to return a Cache system depending on the received platform parameter.

Jump to

Keyboard shortcuts

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