{"id":27455930,"url":"https://github.com/adityamotale/turbo_cache","last_synced_at":"2025-04-15T17:12:47.598Z","repository":{"id":269973485,"uuid":"909006974","full_name":"AdityaMotale/turbo_cache","owner":"AdityaMotale","description":"A persistent, file-based Key-Value store implementation in Rust.","archived":false,"fork":false,"pushed_at":"2024-12-27T14:17:42.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T17:12:43.958Z","etag":null,"topics":["database","kv-store","rust"],"latest_commit_sha":null,"homepage":"","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/AdityaMotale.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-27T14:16:12.000Z","updated_at":"2024-12-31T14:32:27.000Z","dependencies_parsed_at":"2024-12-27T15:23:50.299Z","dependency_job_id":"ed7f7fef-cad3-40cc-a821-dbe13ac7af49","html_url":"https://github.com/AdityaMotale/turbo_cache","commit_stats":null,"previous_names":["frozen-beak/turbo_cache","adityamotale/turbo_cache"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaMotale%2Fturbo_cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaMotale%2Fturbo_cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaMotale%2Fturbo_cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdityaMotale%2Fturbo_cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdityaMotale","download_url":"https://codeload.github.com/AdityaMotale/turbo_cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116245,"owners_count":21215143,"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":["database","kv-store","rust"],"created_at":"2025-04-15T17:12:46.969Z","updated_at":"2025-04-15T17:12:47.588Z","avatar_url":"https://github.com/AdityaMotale.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TurboCache 🚀📦\n\nA persistent, file-based Key-Value store implementation in Rust. \n\nIt supports fixed-size KV storage with automatic resizing.\n\n## Features\n\n- File-based storage with linear probing for collision resolution\n- Automatic table resizing when load factor exceeds 75%\n- Fixed-size keys (8 bytes) and values (56 bytes)\n- FNV-1a hash function implementation\n\n## Usage\n\n```rust\nuse turbo_cache::file_hash::FileHash;\n\nfn main() -\u003e std::io::Result\u003c()\u003e {\n    let mut turbo_cache = FileHash::init()?;\n\n    // Store Entries\n    turbo_cache.set(\"user_1\", \"John Doe\")?;\n    turbo_cache.set(\"user_2\", \"Jane Smith\")?;\n\n    // Fetch Entries\n    assert_eq!(turbo_cache.get(\"user_1\")?, Some(\"John Doe\".to_string()));\n\n    // Delete Entries\n    assert_eq!(turbo_cache.del(\"user_2\")?, Some(\"Jane Smith\".to_string()));\n    assert_eq!(turbo_cache.get(\"user_2\")?, None);\n\n    Ok(())\n}\n```\n\n## API\n\n- `FileHash::init() -\u003e io::Result\u003cFileHash\u003e`\n\n    Creates or opens hash table stored in `hash.tc`.\n\n- `set(\u0026mut self, key: \u0026str, value: \u0026str) -\u003e io::Result\u003c()\u003e`\n    \n    Inserts or updates a key-value pair.\n\n- `get(\u0026mut self, key: \u0026str) -\u003e io::Result\u003cOption\u003cString\u003e\u003e`\n    \n    Retrieves value for given key.\n\n- `del(\u0026mut self, key: \u0026str) -\u003e io::Result\u003cOption\u003cString\u003e\u003e`\n    \n    Removes key-value pair and returns removed value.\n\n## Performance\n\nBenchmarks conducted on:\n\n- CPU: Intel Core i5-10300H @ 2.50GHz\n- RAM: 16GB\n- OS: Windows 64-bit (WSL2 Ubuntu 24.04.1 LTS)\n\n| Operation       | Time      |\n| --------------- | --------- |\n| 100K insertions | ~174.79ms |\n| 100K retrievals | ~70.21ms  |\n| 100K deletions  | ~161.62ms |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityamotale%2Fturbo_cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityamotale%2Fturbo_cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityamotale%2Fturbo_cache/lists"}