inmemstore

package
v0.0.0-...-68d1c55 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 2 Imported by: 3

Documentation

Overview

package store implements the neteaseapi store interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemStore

type InMemStore struct {
	Store *cache.Cache

	DefaultExpiration time.Duration
	CleanupInterval   time.Duration
}

func Default

func Default() *InMemStore

func New

func New(defaultExp, cleanInterval time.Duration) *InMemStore

func (*InMemStore) Add

func (s *InMemStore) Add(k string, v interface{}, d time.Duration) error

func (*InMemStore) Delete

func (s *InMemStore) Delete(k string)

func (*InMemStore) DeleteExpired

func (s *InMemStore) DeleteExpired()

func (*InMemStore) Flush

func (s *InMemStore) Flush()

func (*InMemStore) Get

func (s *InMemStore) Get(k string) (interface{}, bool)

func (*InMemStore) ItemCount

func (s *InMemStore) ItemCount() int

func (*InMemStore) Set

func (s *InMemStore) Set(k string, v interface{}, d time.Duration)

func (*InMemStore) SetDefault

func (s *InMemStore) SetDefault(k string, v interface{})

Jump to

Keyboard shortcuts

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