{"id":26291517,"url":"https://github.com/psiace/breve","last_synced_at":"2025-03-15T00:39:18.039Z","repository":{"id":282069761,"uuid":"947401398","full_name":"PsiACE/breve","owner":"PsiACE","description":"In-memory cache implementation with Uno as the admission policy and S3-FIFO as the eviction policy","archived":false,"fork":false,"pushed_at":"2025-03-12T16:21:39.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T16:45:44.721Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PsiACE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-03-12T16:21:05.000Z","updated_at":"2025-03-12T16:21:43.000Z","dependencies_parsed_at":"2025-03-12T16:45:50.166Z","dependency_job_id":"e9385417-6442-4f2a-adb6-03996770c8b3","html_url":"https://github.com/PsiACE/breve","commit_stats":null,"previous_names":["psiace/breve"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbreve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbreve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbreve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fbreve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PsiACE","download_url":"https://codeload.github.com/PsiACE/breve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243667965,"owners_count":20328036,"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":[],"created_at":"2025-03-15T00:39:17.622Z","updated_at":"2025-03-15T00:39:18.021Z","avatar_url":"https://github.com/PsiACE.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Breve\n\nBreve is a cache implementation that combines lightweight machine learning with efficient eviction strategies. It uses Uno as the admission policy and [S3-FIFO](https://s3fifo.com/) as the eviction policy. This project is inspired by [TinyUFO](https://github.com/cloudflare/pingora/tree/main/tinyufo) (Cloudflare) and builds upon its foundation with significant improvements.\n\n## Key Features\n\n- **Lightweight Machine Learning**: Utilizes the Uno algorithm for cache admission decisions, employing a simple linear regression model to predict item access value\n- **Efficient Eviction Strategy**: Based on an improved version of S3-FIFO, optimizing cache hit rates through separated queues and access counting\n- **Concurrency Safety**: Thread-safe implementation using atomic operations and lock-free data structures\n- **Memory Efficiency**: Offers both compact and fast storage backends to suit different needs\n\n## Core Components\n\n### Uno Admission Policy (by [PsiACE](https://github.com/PsiACE))\n\nUno is a lightweight machine learning algorithm designed to predict the access value of cache items. It consists of two main components:\n\n- **UnoSketch**: A Count-Min Sketch based implementation for estimating item access frequency and reuse distance\n- **UnoLearner**: A simple linear regression model that optimizes prediction accuracy through online learning\n\n### S3-FIFO Eviction Policy\n\nS3-FIFO is an efficient cache eviction algorithm, which Breve enhances with the following improvements:\n\n- Separates cache into small and large queues for better handling of different access patterns\n- Uses access counting to optimize eviction decisions\n- Supports weight-aware cache management\n\n\n## Why \"Breve\"?\n\n\u003e There are a lot of really good caching libraries named in relation to coffee, so I chose to use Breve. \n\u003e Although I have been having two cappuccinos a day for the last few days.\n\nBreve is particularly well-suited for:\n\n- High-concurrency cache systems\n- Applications with strict memory efficiency requirements\n- Scenarios requiring adaptive cache strategies\n\n## License\n\nBreve is licensed under the [Apache 2.0](./LICENSE) License. Same as TinyUFO.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsiace%2Fbreve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsiace%2Fbreve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsiace%2Fbreve/lists"}