l2cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Cache cache object

func New

func New(limit int, dir string) (*Cache, error)

New create cache

func (*Cache) Close

func (c *Cache) Close()

Close close cache and free data

func (*Cache) Limit

func (c *Cache) Limit() int

Limit get limit size

func (*Cache) Read

func (c *Cache) Read(data []byte) (int, error)

Read read data from cache

func (*Cache) Write

func (c *Cache) Write(data []byte) (int, error)

Write write data to cache

Jump to

Keyboard shortcuts

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