linkcache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkCache

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

LinkCache is the in memory link cache object.

func NewLinkCache

func NewLinkCache(defaultExpiration time.Duration) *LinkCache

NewLinkCache initialises the cache with a default expiration duration.

func (*LinkCache) Get

func (lc *LinkCache) Get(u *url.URL) bool

Get returns true if the url has been "seen" in the cache, otherwise false.

func (*LinkCache) Set

func (lc *LinkCache) Set(u *url.URL)

Set allows you to add a url to the cache to be marked as "seen".

Jump to

Keyboard shortcuts

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