-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Disk and memory-backed cache with Foyer 0.10. (#2890)
## Description of changes The lfu/lru/weighted_lfu caches didn't initialize a hybrid cache. This PR rewrites the chroma_cache crate to hide implementation details of the cache as much as possible. Noteworthy callouts from this PR: - We don't currently support cleaning up of tempfiles evicted from cache. This is status-quo. - cops-disk-cache-config-writer and cops-memory-cache-config-writer provide command-line arguments to generate the YAML for the Foyer cache. - Cache<K, V> is a trait. PersistentCache<K, V> allows for requiring persistence. All PersistentCache<K, V> can be cast to Cache<K, V>. ## Test plan *How are these changes tested?* - [] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?*
- Loading branch information
Showing
30 changed files
with
1,205 additions
and
594 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.