staticfilecache

package module
v0.0.0-...-4d03c8d Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2016 License: MIT Imports: 9 Imported by: 1

README

staticfilecache

httpcache compatible human-readable static file cache

Build Status Go Report Card

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
}

func New

func New(basePath string) *Cache

func (*Cache) Delete

func (c *Cache) Delete(key string)

func (*Cache) Get

func (c *Cache) Get(key string) (resp []byte, ok bool)

func (*Cache) Set

func (c *Cache) Set(key string, resp []byte)

type UrlSegment

type UrlSegment struct {
	Domain   string
	Path     []string
	FileName string
}

func ParseUrl

func ParseUrl(rawurl string) (seg UrlSegment, ok bool)

func (*UrlSegment) ToCacheDir

func (seg *UrlSegment) ToCacheDir(root string) string

func (*UrlSegment) ToCacheFilePath

func (seg *UrlSegment) ToCacheFilePath(root string) string

Jump to

Keyboard shortcuts

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