discache

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 8 Imported by: 0

README

discache

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(maxByte int64, onEvicted func(key string, value []byte)) *Cache

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, bool)

func (*Cache) Len

func (c *Cache) Len() int

func (*Cache) Size

func (c *Cache) Size() int64

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseUrl string) *Client

func (*Client) Add

func (c *Client) Add(key string, value []byte) error

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(port int, maxByte int64, onEvicted func(key string, value []byte)) *Server

Jump to

Keyboard shortcuts

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