showskip

package
v0.1.144 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: GPL-2.0, GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package showskip provides a TTL-based cache for show-level subtitle pre-check results. It avoids repeating expensive API calls for the same series on every scan cycle.

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
}

Cache caches show-level subtitle count pre-check results across scan batches with a TTL.

func New

func New(ttl time.Duration) *Cache

New creates a cache with the given TTL.

func (*Cache) Clear

func (c *Cache) Clear()

Clear removes all cached entries.

func (*Cache) Get

func (c *Cache) Get(key string) (skip, ok bool)

Get returns the cached skip decision if present and not expired.

func (*Cache) Prune

func (c *Cache) Prune()

Prune removes expired entries from the cache, reclaiming memory.

func (*Cache) Set

func (c *Cache) Set(key string, skip bool)

Set stores a skip decision with TTL-based expiry.

Jump to

Keyboard shortcuts

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