{"id":31921860,"url":"https://github.com/rmw-lib/file_cache","last_synced_at":"2026-07-15T01:31:06.089Z","repository":{"id":44776195,"uuid":"512993992","full_name":"rmw-lib/file_cache","owner":"rmw-lib","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-25T08:44:28.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-19T00:48:00.667Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmw-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-12T04:07:46.000Z","updated_at":"2022-11-11T16:38:05.000Z","dependencies_parsed_at":"2022-09-26T21:21:38.571Z","dependency_job_id":null,"html_url":"https://github.com/rmw-lib/file_cache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rmw-lib/file_cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-lib%2Ffile_cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-lib%2Ffile_cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-lib%2Ffile_cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-lib%2Ffile_cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmw-lib","download_url":"https://codeload.github.com/rmw-lib/file_cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmw-lib%2Ffile_cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35486961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-13T22:55:06.946Z","updated_at":"2026-07-15T01:31:06.072Z","avatar_url":"https://github.com/rmw-lib.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file_cache\n\ncache file open handle\n\nuse example\n\n[./examples/main.rs](./examples/main.rs)\n\n```rust\nuse anyhow::Result;\nuse async_std::io::{prelude::SeekExt, ReadExt, SeekFrom};\nuse file_cache::FileCache;\n\nasync fn get(cache: \u0026mut FileCache) -\u003e Result\u003c()\u003e {\n  let mut path = std::env::current_exe()?;\n  (0..4).for_each(|_| {\n    path.pop();\n  });\n  let path = path.join(\"Cargo.toml\").display().to_string();\n  let host = cache.get(path).await?;\n  let mut host = host.value();\n  host.seek(SeekFrom::Start(0)).await?;\n  let mut out = [0u8; 1024];\n  let n = host.read(\u0026mut out).await?;\n  println!(\"{}\", std::str::from_utf8(\u0026out[..n])?);\n  dbg!(n);\n  Ok(())\n}\n\n#[async_std::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n  let mut cache = FileCache::new(2048)?;\n  get(\u0026mut cache).await?;\n  Ok(())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmw-lib%2Ffile_cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmw-lib%2Ffile_cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmw-lib%2Ffile_cache/lists"}