cache

package
v1.18.6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastCache

type FastCache struct {
	Data []byte
	// contains filtered or unexported fields
}

func OpenCache

func OpenCache(name string, size int64) (*FastCache, error)

func (*FastCache) Close

func (fc *FastCache) Close()

type Map added in v1.18.5

type Map[K any, V any] struct {
	// contains filtered or unexported fields
}

Map 二次封装的泛型sync.Map

func (*Map[K, V]) Get added in v1.18.5

func (this *Map[K, V]) Get(k K) (V, bool)

func (*Map[K, V]) Put added in v1.18.5

func (this *Map[K, V]) Put(k K, v V)

type Pool added in v1.18.5

type Pool[E any] struct {
	// contains filtered or unexported fields
}

Pool 二次封装的泛型sync.Pool

func (*Pool[E]) Acquire added in v1.18.5

func (this *Pool[E]) Acquire() *E

Acquire 申请内存

func (*Pool[E]) Release added in v1.18.5

func (this *Pool[E]) Release(obj *E)

Release 释放内存

Jump to

Keyboard shortcuts

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