cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func BackendFromRuntime

func BackendFromRuntime(runtimeInstance runtimecontract.Runtime, serviceName string) *Backend

func NewBackend

func NewBackend(
	client rueidis.Client,
	ctx context.Context,
	prefix string,
	scanCount int,
	deleteBatch int,
) (*Backend, error)

func (*Backend) Clear

func (instance *Backend) Clear() error

func (*Backend) ClearByPrefix

func (instance *Backend) ClearByPrefix(prefix string) error

func (*Backend) Close

func (instance *Backend) Close() error

func (*Backend) Decrement

func (instance *Backend) Decrement(key string, delta int64) (int64, error)

func (*Backend) Delete

func (instance *Backend) Delete(key string) error

func (*Backend) DeleteMultiple

func (instance *Backend) DeleteMultiple(keys []string) error

func (*Backend) Get

func (instance *Backend) Get(key string) ([]byte, bool, error)

func (*Backend) Has

func (instance *Backend) Has(key string) (bool, error)

func (*Backend) Increment

func (instance *Backend) Increment(key string, delta int64) (int64, error)

func (*Backend) Many

func (instance *Backend) Many(keys []string) (map[string][]byte, error)

func (*Backend) Set

func (instance *Backend) Set(key string, payload []byte, ttl time.Duration) error

func (*Backend) SetMultiple

func (instance *Backend) SetMultiple(items map[string][]byte, ttl time.Duration) error

type BackendService

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

func NewBackendService

func NewBackendService(
	client rueidis.Client,
	prefix string,
	scanCount int,
	deleteBatch int,
) (*BackendService, error)

func (*BackendService) Clear

func (instance *BackendService) Clear() error

func (*BackendService) ClearByPrefix

func (instance *BackendService) ClearByPrefix(prefix string) error

func (*BackendService) Close

func (instance *BackendService) Close() error

func (*BackendService) Decrement

func (instance *BackendService) Decrement(key string, delta int64) (int64, error)

func (*BackendService) Delete

func (instance *BackendService) Delete(key string) error

func (*BackendService) DeleteMultiple

func (instance *BackendService) DeleteMultiple(keys []string) error

func (*BackendService) Get

func (instance *BackendService) Get(key string) ([]byte, bool, error)

func (*BackendService) Has

func (instance *BackendService) Has(key string) (bool, error)

func (*BackendService) Increment

func (instance *BackendService) Increment(key string, delta int64) (int64, error)

func (*BackendService) Many

func (instance *BackendService) Many(keys []string) (map[string][]byte, error)

func (*BackendService) Set

func (instance *BackendService) Set(key string, payload []byte, ttl time.Duration) error

func (*BackendService) SetMultiple

func (instance *BackendService) SetMultiple(items map[string][]byte, ttl time.Duration) error

func (*BackendService) WithContext

func (instance *BackendService) WithContext(ctx context.Context) *Backend

Jump to

Keyboard shortcuts

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