Documentation
¶
Overview ¶
Package cache 实现反搜响应的文件缓存:key 为 source + 原图 SHA-256, 只保存规范化响应与写入时间(不保存图片、鉴权 header 或 JavDB 详情), 原子写入 0600,TTL 默认 30 天。
Index ¶
Constants ¶
View Source
const DefaultTTL = 30 * 24 * time.Hour
DefaultTTL 是缓存条目默认有效期(30 天)。
Variables ¶
This section is empty.
Functions ¶
func SortedSources ¶
SortedSources 返回统计中的 source 名列表(升序)。
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store 是目录化的反搜响应缓存;每个 source 一个 JSON 文件。
Click to show internal directories.
Click to hide internal directories.