{"id":13636553,"url":"https://github.com/zkat/cacache-rs","last_synced_at":"2025-05-14T03:11:12.931Z","repository":{"id":38107218,"uuid":"187733059","full_name":"zkat/cacache-rs","owner":"zkat","description":"A high-performance, concurrent, content-addressable disk cache, with support for both sync and async APIs. 💩💵 but for your 🦀","archived":false,"fork":false,"pushed_at":"2024-11-26T09:34:52.000Z","size":443,"stargazers_count":609,"open_issues_count":16,"forks_count":39,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-12T19:13:02.258Z","etag":null,"topics":["cache","library","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cacache","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["zkat"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"custom":null}},"created_at":"2019-05-21T00:35:02.000Z","updated_at":"2025-05-12T18:40:51.000Z","dependencies_parsed_at":"2024-04-07T03:32:30.281Z","dependency_job_id":"06774b9b-4b8c-447a-aabb-2458fd6317bc","html_url":"https://github.com/zkat/cacache-rs","commit_stats":{"total_commits":218,"total_committers":10,"mean_commits":21.8,"dds":0.04587155963302747,"last_synced_commit":"81bc84b33d02b103b3c53b54dcd81ab681533b58"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcacache-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcacache-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcacache-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcacache-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkat","download_url":"https://codeload.github.com/zkat/cacache-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059518,"owners_count":22007771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","library","rust"],"created_at":"2024-08-02T00:01:02.640Z","updated_at":"2025-05-14T03:11:07.914Z","avatar_url":"https://github.com/zkat.png","language":"Rust","funding_links":["https://github.com/sponsors/zkat"],"categories":["Libraries","Rust","rust"],"sub_categories":["Caching"],"readme":"# cacache [![CI](https://github.com/zkat/cacache-rs/workflows/CI/badge.svg)](https://github.com/zkat/cacache-rs/actions) [![crates.io](https://img.shields.io/crates/v/cacache.svg)](https://crates.io/crates/cacache)\n\nA high-performance, concurrent, content-addressable disk cache, optimized for async APIs.\n\n## Example\n\n```rust\nuse cacache;\nuse async_attributes;\n\n#[async_attributes::main]\nasync fn main() -\u003e Result\u003c(), cacache::Error\u003e {\n    let dir = String::from(\"./my-cache\");\n\n    // Write some data!\n    cacache::write(\u0026dir, \"key\", b\"my-async-data\").await?;\n\n    // Get the data back!\n    let data = cacache::read(\u0026dir, \"key\").await?;\n    assert_eq!(data, b\"my-async-data\");\n\n    // Clean up the data!\n    cacache::rm::all(\u0026dir).await?;\n}\n```\n\n## Install\n\nUsing [`cargo-edit`](https://crates.io/crates/cargo-edit)\n\n`$ cargo add cacache`\n\nMinimum supported Rust version is `1.43.0`.\n\n## Documentation\n\n- [API Docs](https://docs.rs/cacache)\n\n## Features\n\n- First-class async support, using either\n  [`async-std`](https://crates.io/crates/async-std) or\n  [`tokio`](https://crates.io/crates/tokio) as its runtime. Sync APIs are\n  available but secondary. You can also use sync APIs only and remove the\n  async runtime dependency.\n- `std::fs`-style API\n- Extraction by key or by content address (shasum, etc)\n- [Subresource Integrity](#integrity) web standard support\n- Multi-hash support - safely host sha1, sha512, etc, in a single cache\n- Automatic content deduplication\n- Atomic content writes even for large data\n- Fault tolerance (immune to corruption, partial writes, process races, etc)\n- Consistency guarantees on read and write (full data verification)\n- Lockless, high-concurrency cache access\n- Really helpful, contextual error messages\n- Large file support\n- Pretty darn fast\n- Arbitrary metadata storage\n- Cross-platform: Windows and case-(in)sensitive filesystem support\n- [`miette`](https://crates.io/crates/miette) integration for detailed, helpful error reporting.\n- Punches nazis\n\n`async-std` is the default async runtime. To use `tokio` instead, turn off\ndefault features and enable the `tokio-runtime` feature, like this:\n\n```toml\n[dependencies]\ncacache = { version = \"*\", default-features = false, features = [\"tokio-runtime\", \"mmap\"] }\n```\n\nYou can also remove async APIs altogether, including removing async runtime\ndependency:\n\n```toml\n[dependencies]\ncacache = { version = \"*\", default-features = false, features = [\"mmap\"] }\n```\n\nExperimental support for symlinking to existing files is provided via the\n\"link_to\" feature.\n\n## Contributing\n\nThe cacache team enthusiastically welcomes contributions and project\nparticipation! There's a bunch of things you can do if you want to contribute!\nThe [Contributor Guide](CONTRIBUTING.md) has all the information you need for\neverything from reporting bugs to contributing entire new features. Please\ndon't hesitate to jump in if you'd like to, or even ask us questions if\nsomething isn't clear.\n\nAll participants and maintainers in this project are expected to follow [Code\nof Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each\nother.\n\nHappy hacking!\n\n## MSRV\n\nThe Minimum Supported Rust Version for cacache is `1.67.0`. Any changes to the\nMSRV will be considered breaking changes.\n\n## License\n\nThis project is licensed under [the Apache-2.0 License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkat%2Fcacache-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkat%2Fcacache-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkat%2Fcacache-rs/lists"}