
The highest tagged major version is
v3.
package
Version:
v1.9.1
Opens a new window with list of versions in this module.
Published: Mar 20, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
CacheKey returns a filesystem-safe hex key for an API version + path.
type DiskCache struct {
}
DiskCache stores HTTP responses on disk.
NewDiskCache creates a new disk cache rooted at ~/.vulnetix/cache/vdb.
Clear removes all cached entries.
Dir returns the cache directory path.
Get retrieves a cache entry. Returns (entry, true) on hit.
A stale entry is still returned so callers can do conditional requests.
Put writes a cache entry to disk atomically.
type Entry struct {
Body []byte `json:"body"`
ETag string `json:"etag,omitempty"`
LastModified string `json:"lastModified,omitempty"`
CachedAt time.Time `json:"cachedAt"`
TTL time.Duration `json:"ttl"`
}
Entry represents a cached HTTP response.
IsFresh returns true if the entry has not expired.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.