pub fn search_with_cache(
request: &SearchRequest,
cache: Option<&dyn DiscoveryCache>,
) -> Result<Vec<FileEntry>, PathError>Available on crate feature
search only.Expand description
Search using an explicit discovery cache.
§Cache rules
| Policy | Without cache | With cache |
|---|---|---|
CachePolicy::Bypass | Scan only | Scan only (no read/write) |
CachePolicy::ReadThrough | Scan only | Read then maybe write |
CachePolicy::Refresh | Scan only | Scan and write |
There is no process-global default cache. Callers that want caching must
supply their own [MemoryCache] or crate::cache::PersistentCache.
§Filesystem access
Yes. Requires the root to exist.
§Security
Cache hits are performance artifacts only. Re-validate paths before security-sensitive use.