cache

package
v0.0.0-...-19dffb3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

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 stores the data for a requested URL.

func New

func New() *Cache

New builds a new cache and initializes the map.

func (*Cache) Get

func (c *Cache) Get(url string) (data []byte, found bool, err error)

Get fetches a URL, using the previously-cached data if the server returns 304 Not Modified.

Jump to

Keyboard shortcuts

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