{"id":48073873,"url":"https://github.com/bootjp/adaptsize-go","last_synced_at":"2026-04-04T14:48:20.732Z","repository":{"id":328608012,"uuid":"1088709932","full_name":"bootjp/adaptsize-go","owner":"bootjp","description":"Go AdaptSize cache: size-aware admission exp(-size/c) + LRU eviction with background tuner maximizing OHR, for KVS front-ends.","archived":false,"fork":false,"pushed_at":"2025-12-24T05:38:09.000Z","size":457,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-25T18:52:28.123Z","etag":null,"topics":["adaptsize","admission-control","cache","caching","kvs","lru","size-aware-caching"],"latest_commit_sha":null,"homepage":"","language":"Go","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/bootjp.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-03T10:55:26.000Z","updated_at":"2025-12-24T05:37:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bootjp/adaptsize-go","commit_stats":null,"previous_names":["bootjp/adaptsize-go"],"tags_count":0,"template":false,"template_full_name":"bootjp/go-docker-actions-template","purl":"pkg:github/bootjp/adaptsize-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootjp%2Fadaptsize-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootjp%2Fadaptsize-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootjp%2Fadaptsize-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootjp%2Fadaptsize-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bootjp","download_url":"https://codeload.github.com/bootjp/adaptsize-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootjp%2Fadaptsize-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["adaptsize","admission-control","cache","caching","kvs","lru","size-aware-caching"],"created_at":"2026-04-04T14:48:20.640Z","updated_at":"2026-04-04T14:48:20.709Z","avatar_url":"https://github.com/bootjp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# AdaptSize cache for Go KVS\n\n- Admission: `P(admit) = exp(-size/c)`\n- Eviction: LRU\n- Background tuning: maximize OHR by grid-searching `c`; for each `c`, solve `μ` s.t. `Σ P_in(i)*s_i = K` via binary search.\n\n## Usage\n\n```go\ncache := adaptsize.New(adaptsize.Options{\n    CapacityBytes: 1\u003c\u003c30, // 1 GiB\n    WindowN:       250_000,\n})\ndefer cache.Close()\n\n// For every request, record it and decide admission on misses.\nreq := adaptsize.Request{Key: \"k1\", SizeBytes: 1234, Hit: false} // hit comes from your cache\nadmit := cache.Request(req)\nif !req.Hit \u0026\u0026 admit {\n    // insert into your cache implementation\n}\n\nc := cache.ParameterC()\n_ = c\n```\n\n\n## Acknowledgments and References\n\nThis library is a reimplementation based on the formulas and design principles of **AdaptSize**, a paper by Akamai researchers published at NSDI 2017. We acknowledge the prior work of the authors and their institutions. This is an independent third-party implementation and is not affiliated with the paper’s authors, their institutions, or the conference.\n\n**References**\n- AdaptSize, Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI), 2017. Akamai Technologies.  \n  Core elements in this implementation: size-aware admission `exp(-size/c)`, a closed-form in-cache probability derived from the theorem, solving `μ` from the capacity constraint, and a global search that maximizes OHR (Object Hit Ratio).\n\n**Notes**\n- The API and parameter tuning implemented here follow the paper’s model; we adopt `exp(-size/c)` to match the paper’s notation.\n- This code is not the paper’s official implementation. Algorithmic accuracy and applicability depend on the workload.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootjp%2Fadaptsize-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbootjp%2Fadaptsize-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootjp%2Fadaptsize-go/lists"}