Documentation
¶
Index ¶
- func Diff(cachedHashes, diskHashes map[string]string) (changed, deleted []string)
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) Delete(filePath string) error
- func (c *Cache) DeleteMany(filePaths []string) error
- func (c *Cache) GetState(key string) (string, error)
- func (c *Cache) LoadAll() ([]*PageRecord, error)
- func (c *Cache) LoadHashes() (map[string]string, error)
- func (c *Cache) Save(r *PageRecord) error
- func (c *Cache) SetState(key, value string) error
- type PageRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache manages the SQLite build cache.
func (*Cache) DeleteMany ¶
DeleteMany removes multiple page records.
func (*Cache) LoadAll ¶
func (c *Cache) LoadAll() ([]*PageRecord, error)
LoadAll returns all cached page records.
func (*Cache) LoadHashes ¶
LoadHashes returns a map of file_path → file_hash for all cached pages.
func (*Cache) Save ¶
func (c *Cache) Save(r *PageRecord) error
Save upserts a page record into the cache.
type PageRecord ¶
type PageRecord struct {
FilePath string
FileHash string
Permalink string
Title string
LinkTitle string
Description string
Tags []string
Date time.Time
Section string
Lang string
Depth int
WordCount int
ReadingTime int
Summary string
ContentPlain string // plain text for search (stripped HTML)
Params map[string]any
Weight int
NoIndex bool
ExcludeSearch bool
Type string
Draft bool
Kind string
BuiltAt int64
}
PageRecord is a row from page_cache.
Click to show internal directories.
Click to hide internal directories.