Versions in this module Expand all Collapse all v0 v0.5.1 May 12, 2026 v0.1.0 May 12, 2026 Changes in this version + func GenerateKey(command string, args []string, workingDir string, fileHashes map[string]string, ...) string + func GetChangedFiles(workingDir string, oldCommit, newCommit string) ([]string, error) + func IsGitRepo(workingDir string) bool + type Cache interface + Delete func(key string) + Get func(key string) (interface{}, bool) + Len func() int + Set func(key string, value interface{}) + type CacheEntry struct + AccessedAt time.Time + Args string + Command string + CompressionRatio float64 + CreatedAt time.Time + FileHashes string + FilteredOutput string + FilteredTokens int + HitCount int + Key string + OriginalTokens int + WorkingDir string + type CacheKeyOptions struct + Budget int + QueryIntent string + Tier string + type CacheStats struct + HitRate float64 + TotalEntries int64 + TotalHits int64 + TotalMisses int64 + TotalSaved int64 + type FingerprintCache struct + func GetGlobalCache() *FingerprintCache + func NewFingerprintCache() *FingerprintCache + func (c *FingerprintCache) Get(key string) (string, bool) + func (c *FingerprintCache) Set(key, value string) + type GitWatcher struct + func NewGitWatcher(cache *QueryCache) *GitWatcher + func (w *GitWatcher) GetFileHashes(workingDir string, files []string) (map[string]string, error) + func (w *GitWatcher) InvalidateChanged(workingDir string) error + type LRUCache struct + func NewLRUCache(capacity int, ttl time.Duration) *LRUCache + func (c *LRUCache) Delete(key string) + func (c *LRUCache) Get(key string) (interface{}, bool) + func (c *LRUCache) Len() int + func (c *LRUCache) Set(key string, value interface{}) + type MultiLevelCache struct + func NewMultiLevelCache(l2Dir string, maxL1Size int) (*MultiLevelCache, error) + func (mc *MultiLevelCache) Get(key string) (string, bool) + func (mc *MultiLevelCache) Set(key, value string) + type QueryCache struct + func NewQueryCache(dbPath string) (*QueryCache, error) + func (c *QueryCache) Cleanup(maxAge time.Duration) error + func (c *QueryCache) Close() error + func (c *QueryCache) Get(key string) (*CacheEntry, bool) + func (c *QueryCache) GetRuntimeStats() (hits, misses int64) + func (c *QueryCache) GetTopQueries(limit int) ([]*CacheEntry, error) + func (c *QueryCache) Invalidate(predicate func(*CacheEntry) bool) error + func (c *QueryCache) InvalidateByCommand(command string) error + func (c *QueryCache) InvalidateByPrefix(prefix string) error + func (c *QueryCache) Set(key string, command string, args []string, workingDir string, ...) error + func (c *QueryCache) Stats() (*CacheStats, error) + type RepoState struct + DirtyFiles map[string]string + HeadCommit string + LastChecked time.Time + WorkingDir string