cache

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGalleryCache added in v0.7.0

func InitGalleryCache()

InitGalleryCache initializes the abstraction layer for the gallery cache.

func InitPhysicalCache added in v0.7.0

func InitPhysicalCache()

InitPhysicalCache initializes the physical cache directories.

func InitProcessingStatusCache added in v0.7.0

func InitProcessingStatusCache()

func PruneCache

func PruneCache()

PruneCache removes entries not accessed (internal timestamp in mem) in the last x time in a thread-safe manner.

func PruneCacheFS

func PruneCacheFS()

PruneCacheFS removes entries not accessed (filesystem timestamp) in the last x time. Not thread-safe.

func Read

func Read(archivePath string, galleryUUID string) ([]string, int)

Read reads the cached gallery from the disk. If it doesn't exist, it will be created and then read.

Types

type GalleryCache

type GalleryCache struct {
	Path  string
	Store map[string]cacheValue
}

type ProcessingStatus added in v0.7.0

type ProcessingStatus struct {
	Scan       scanResult
	Thumbnails thumbnailResult
	Metadata   metadataResult
}
var ProcessingStatusCache *ProcessingStatus

func (*ProcessingStatus) AddMetadataError added in v0.7.0

func (s *ProcessingStatus) AddMetadataError(uuidOrPath string, err string, details map[string]string)

func (*ProcessingStatus) AddScanError added in v0.7.0

func (s *ProcessingStatus) AddScanError(uuidOrPath string, err string, details map[string]string)

func (*ProcessingStatus) AddScanFoundGallery added in v0.7.0

func (s *ProcessingStatus) AddScanFoundGallery(galleryUUID string)

func (*ProcessingStatus) AddScanSkippedGallery added in v0.7.0

func (s *ProcessingStatus) AddScanSkippedGallery(galleryUUID string)

func (*ProcessingStatus) AddThumbnailError added in v0.7.0

func (s *ProcessingStatus) AddThumbnailError(uuidOrPath string, err string, details map[string]string)

func (*ProcessingStatus) AddThumbnailGeneratedCover added in v0.7.0

func (s *ProcessingStatus) AddThumbnailGeneratedCover()

func (*ProcessingStatus) AddThumbnailGeneratedPage added in v0.7.0

func (s *ProcessingStatus) AddThumbnailGeneratedPage()

func (*ProcessingStatus) Reset added in v0.7.0

func (s *ProcessingStatus) Reset()

func (*ProcessingStatus) SetMetadataRunning added in v0.7.0

func (s *ProcessingStatus) SetMetadataRunning(running bool)

func (*ProcessingStatus) SetScanRunning added in v0.7.0

func (s *ProcessingStatus) SetScanRunning(running bool)

func (*ProcessingStatus) SetThumbnailsRunning added in v0.7.0

func (s *ProcessingStatus) SetThumbnailsRunning(running bool)

func (*ProcessingStatus) SetTotalCoversAndPages added in v0.7.0

func (s *ProcessingStatus) SetTotalCoversAndPages(coverCount int, pageCount int)

Jump to

Keyboard shortcuts

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