{"id":18617924,"url":"https://github.com/a-hilaly/memcache","last_synced_at":"2025-09-03T08:34:37.595Z","repository":{"id":97856146,"uuid":"131321198","full_name":"a-hilaly/memcache","owner":"a-hilaly","description":"A small memcache implementation Go","archived":false,"fork":false,"pushed_at":"2019-01-03T10:58:39.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T04:07:54.294Z","etag":null,"topics":["auditing","memcache","threadsafe"],"latest_commit_sha":null,"homepage":"","language":"Go","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/a-hilaly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit.go","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-27T16:33:58.000Z","updated_at":"2019-01-03T10:59:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"126a73d7-722a-49dc-8d73-231a763decc2","html_url":"https://github.com/a-hilaly/memcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-hilaly%2Fmemcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-hilaly%2Fmemcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-hilaly%2Fmemcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-hilaly%2Fmemcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-hilaly","download_url":"https://codeload.github.com/a-hilaly/memcache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239412485,"owners_count":19634016,"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":["auditing","memcache","threadsafe"],"created_at":"2024-11-07T03:42:53.817Z","updated_at":"2025-02-18T05:01:46.912Z","avatar_url":"https://github.com/a-hilaly.png","language":"Go","readme":"# memcache\n[![CircleCI](https://circleci.com/gh/A-Hilaly/memcache/tree/master.svg?style=svg\u0026circle-token=8ae9aff37a33b81224f4bdb43b5d5621ac766f7b)](https://circleci.com/gh/A-Hilaly/memcache/tree/master) [![codecov](https://codecov.io/gh/A-Hilaly/memcache/branch/master/graph/badge.svg)](https://codecov.io/gh/A-Hilaly/memcache)\n\nZero dependencies memcache key|value store library. It supports multi threaded programs and offer an easy to use auditing properties.\n\n### Features\n\n- Zero dependencies \n- Thread safe cache \u0026 store objects\n- Audit utilities to delete expired items\n\n### Usage\n\n```shell\ngo get -u github.com/a-hilaly/memcache\n```\n\n### Example\n\n ```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/a-hilaly/memcache\"\n)\n\nfunc main() {\n\t// create new cache\n\tmc := memcache.New(10, 10, 2*time.Second)\n\n\t// create audit fn\n\tauditFn := memcache.NewAuditorFunc(time.Millisecond*100, time.Millisecond*500)\n\n    // start auditing\n\tdone, stop := auditFn(mc)\n\n\t// put some key \u0026 value\n    mc.Put(\"key1\", \"value\")\n    \n\ttime.Sleep(time.Second * 1)\n\t// put key2\n\tmc.Put(\"key2\", \"value2\")\n\n\ttime.Sleep(time.Second * 1)\n\n\t// send stop signal to the goroutine auditing the cache\n    stop \u003c- struct{}{}\n    \n\t// wait for it to finish\n\t\u003c-done\n\n\t// check keys values\n\tfmt.Println(mc.Get(\"key\"))  // expired\n\tfmt.Println(mc.Get(\"key2\")) // still exists\n}\n\n}\n ```\n### Benchmarks\n\nsee [BENCHMARKS.md](BENCHMARKS.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-hilaly%2Fmemcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-hilaly%2Fmemcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-hilaly%2Fmemcache/lists"}