{"id":23108878,"url":"https://github.com/archishmansengupta/cache-store","last_synced_at":"2025-12-15T05:05:49.841Z","repository":{"id":244834330,"uuid":"816134903","full_name":"ArchishmanSengupta/cache-store","owner":"ArchishmanSengupta","description":"A simple, efficient,  thread-safe \u003c5KB in-memory data store with expiration time","archived":false,"fork":false,"pushed_at":"2024-12-28T18:47:53.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T18:15:00.985Z","etag":null,"topics":["cache","data-store","go","in-memory","thread-safe"],"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/ArchishmanSengupta.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-06-17T05:27:17.000Z","updated_at":"2025-03-03T17:33:40.000Z","dependencies_parsed_at":"2024-06-17T19:44:58.132Z","dependency_job_id":"b1d2971f-f1d6-4c9d-bf0b-1c1546c36f2a","html_url":"https://github.com/ArchishmanSengupta/cache-store","commit_stats":null,"previous_names":["archishmansengupta/cache-store","archishmansengupta/cache"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchishmanSengupta%2Fcache-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchishmanSengupta%2Fcache-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchishmanSengupta%2Fcache-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchishmanSengupta%2Fcache-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArchishmanSengupta","download_url":"https://codeload.github.com/ArchishmanSengupta/cache-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741474,"owners_count":21797027,"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":["cache","data-store","go","in-memory","thread-safe"],"created_at":"2024-12-17T01:31:42.766Z","updated_at":"2025-12-15T05:05:44.501Z","avatar_url":"https://github.com/ArchishmanSengupta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cache Store\nCache Store is a simple, efficient, and thread-safe in-memory cache library for Go. It allows you to store key-value pairs with optional expiration times, making it an ideal choice for caching frequently accessed data to improve application performance.\n\n### Use Case\nCache Store can be used in various scenarios where caching is beneficial, such as:\n\n- Caching API responses to reduce latency and minimize the number of requests to external services.\n- Storing frequently accessed data, like session data or user preferences, to improve application performance.\n- Implementing a least recently used (LRU) cache for efficient memory management.\n\nHere's an example of using Cache Store:\n\n```Enter key: a3f5d76b-908c-4b7b-9b0c-8a6ee2533e6a\nEnter value: {\"name\": \"John Doe\", \"age\": 30, \"email\": \"johndoe@example.com\"}\nEnter expiration time (seconds): 30\nCache value: {\"name\": \"John Doe\", \"age\": 30, \"email\": \"johndoe@example.com\"}\nKey not found in cache\n```\n\n### Features:\n1. Optional expiration caching\n2. Thread-safe design\n3. Automatic expired cleanup\n4. Comprehensive cache ops\n5. Proper error handling\n   \n\n### Benchmarking\nTo run benchmarks, use the following command:\n\n`go test -bench=. -benchmem -cpu 12`\n\nExample benchmark results on a macOS (Darwin) system with an ARM64 architecture:\n```\nBenchmarkCache_SetValue/Set-0-12                 7123024               144.6 ns/op            72 B/op          4 allocs/op\nBenchmarkCache_GetValue/Get-0-12                30922952                38.03 ns/op            0 B/op          0 allocs/op\nBenchmarkCache_Iterate/Iterate-12                 110947             10935 ns/op              16 B/op          1 allocs/op\n```\nThese benchmarks demonstrate the performance of Cache Store's core functions, such as setting, getting, and iterating over cache items.\n\n### Contribution\nContribute to the project, report issues, or request features by opening a pull request or an issue.\n\nHappy caching!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchishmansengupta%2Fcache-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchishmansengupta%2Fcache-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchishmansengupta%2Fcache-store/lists"}