The highest tagged major version is
v4 .
Discover Packages
github.com/vulnetix/cli
internal
cache
package
Version:
v1.8.0
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 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
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.