cache

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cache provides caching for DLSite work information.

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
}

Cache is a cache for DLSite work information.

func Open

func Open(p string) (*Cache, error)

Open opens and returns a Cache object.

func OpenDefault

func OpenDefault() (*Cache, error)

OpenDefault opens the default cache using XDG directory configuration.

func (*Cache) Close

func (c *Cache) Close() error

Close closes the Cache.

func (*Cache) Get

func (c *Cache) Get(r dlsite.RJCode) (*dlsite.Work, error)

Get returns the work with the RJCode in the Cache.

func (*Cache) Keys added in v1.4.0

func (c *Cache) Keys() ([]dlsite.RJCode, error)

Keys returns all of the keys in the cache.

func (*Cache) Put

func (c *Cache) Put(w *dlsite.Work) error

Put inserts the work into the Cache.

Jump to

Keyboard shortcuts

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