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 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址