cache

package
v1.0.1-0...-099a076 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUCKETS     = 16
	BUCKET_MASK = BUCKETS - 1
)

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(maxSize int) *Cache

func (*Cache) Delete

func (c *Cache) Delete(primary string, secondary string) bool

func (*Cache) DeleteAll

func (c *Cache) DeleteAll(primary string) bool

func (*Cache) Get

func (c *Cache) Get(primary, secondary string) garnish.CachedResponse

func (*Cache) GetSize

func (c *Cache) GetSize() int

func (*Cache) Load

func (c *Cache) Load(path string) error

func (*Cache) Save

func (c *Cache) Save(path string, count int, cutoff time.Duration) error

func (*Cache) Set

func (c *Cache) Set(primary string, secondary string, response garnish.CachedResponse)

func (*Cache) SetSize

func (c *Cache) SetSize(s int)

func (*Cache) Stop

func (c *Cache) Stop()

type Deserializer

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

func (*Deserializer) CloneBytes

func (d *Deserializer) CloneBytes() []byte

func (*Deserializer) ReadByte

func (d *Deserializer) ReadByte() byte

func (*Deserializer) ReadBytes

func (d *Deserializer) ReadBytes() []byte

func (*Deserializer) ReadInt

func (d *Deserializer) ReadInt() int

func (*Deserializer) ReadN

func (d *Deserializer) ReadN(n int) []byte

func (*Deserializer) ReadString

func (d *Deserializer) ReadString() string

type Entry

type Entry struct {
	garnish.CachedResponse
	Primary   string
	Secondary string
	// contains filtered or unexported fields
}

type List

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

func NewList

func NewList() *List

func (*List) PushToFront

func (l *List) PushToFront(entry *Entry)

func (*List) Remove

func (l *List) Remove(entry *Entry)

type Serializer

type Serializer struct {
	*bytes.Buffer
}

func (*Serializer) Write

func (s *Serializer) Write(b []byte)

func (*Serializer) WriteByte

func (s *Serializer) WriteByte(b byte)

func (*Serializer) WriteInt

func (s *Serializer) WriteInt(value int)

func (*Serializer) WriteString

func (s *Serializer) WriteString(str string)

Jump to

Keyboard shortcuts

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