{"id":23681400,"url":"https://github.com/codecat/go-rollingcache","last_synced_at":"2025-09-13T01:35:49.940Z","repository":{"id":57659677,"uuid":"474039342","full_name":"codecat/go-rollingcache","owner":"codecat","description":"Simple rolling cache module for Go.","archived":false,"fork":false,"pushed_at":"2024-11-22T13:23:32.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T18:37:37.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecat.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-25T14:20:51.000Z","updated_at":"2024-11-22T13:23:36.000Z","dependencies_parsed_at":"2022-09-08T00:12:06.570Z","dependency_job_id":null,"html_url":"https://github.com/codecat/go-rollingcache","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/codecat%2Fgo-rollingcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgo-rollingcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgo-rollingcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgo-rollingcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecat","download_url":"https://codeload.github.com/codecat/go-rollingcache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239728178,"owners_count":19687311,"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":"2024-12-29T18:38:01.265Z","updated_at":"2025-02-19T20:23:38.541Z","avatar_url":"https://github.com/codecat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rolling cache\nThis is a simple \"rolling cache\" module for Go. It works as a continuous request loop, where the data is only updated in a specific interval.\n\n## Example usage\nOn-demand request API:\n```go\n// Start a cache loop with:\n// - An interval of 30 seconds\n// - An inactivity lifetime of 5 minutes (interval multiplied by 10)\n// And return the byte data into `res`.\nres, err := rollingcache.Get(\"https://httpbin.org/get\", 30 * time.Second)\n```\n\nContinuous request API:\n```go\n// Start a cache loop with some options. The returned object is a rollingcache.Cache pointer.\n// You can use this pointer to get the cache data.\ncache := rollingcache.Start(\"https://httpbin.org/get\", rollingcache.Options{\n\tInterval: 10 * time.Second,\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecat%2Fgo-rollingcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecat%2Fgo-rollingcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecat%2Fgo-rollingcache/lists"}