pagecache

package
v0.0.0-...-fb91eac Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: GPL-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 CachedPage

type CachedPage struct {
	Pixbuf *gdk.Pixbuf
	Time   time.Time
}

func NewCachedPage

func NewCachedPage(pixbuf *gdk.Pixbuf) CachedPage

type KeepReason

type KeepReason uint8
const (
	KeepReasonPreload KeepReason = 1 << iota
	KeepReasonJumpmark
)

type PageCache

type PageCache struct {
	Pages map[int]CachedPage
	// contains filtered or unexported fields
}

func NewPageCache

func NewPageCache() PageCache

func (*PageCache) DontKeep

func (cache *PageCache) DontKeep(i int, reason KeepReason)

func (*PageCache) DontKeepSlice

func (cache *PageCache) DontKeepSlice(indices []int, reason KeepReason)

func (*PageCache) Get

func (cache *PageCache) Get(i int) (*CachedPage, bool)

func (*PageCache) Insert

func (cache *PageCache) Insert(i int, pixbuf *gdk.Pixbuf, keepReason KeepReason)

func (*PageCache) Keep

func (cache *PageCache) Keep(i int, reason KeepReason)

func (*PageCache) Trim

func (cache *PageCache) Trim()

Jump to

Keyboard shortcuts

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