pub fn parse_pkgbuild_cached(
name: &str,
version: Option<&str>,
source: PkgbuildSourceKind,
pkgbuild: &str,
) -> PkgbuildParseEntryExpand description
What: Parse PKGBUILD data while leveraging a disk-backed LRU cache.
Inputs:
name: Package name used for keying and install path inference.version: Package version (fall back to"unknown"if empty).source: Source kind for keying (Aur/Official/Unknown).pkgbuild: Raw PKGBUILD text to parse.
Output:
- Parsed entry containing backup files and install paths. On cache hit with matching signature, returns the cached entry. On cache miss or signature mismatch, parses fresh data, updates the cache, and returns the new entry.
Details:
- Uses a signature of the PKGBUILD text to detect staleness even when version is unchanged.
- Cache is bounded to 200 entries and persists to disk via
flush_pkgbuild_cache().