{"id":21502399,"url":"https://github.com/night-codes/bcache","last_synced_at":"2025-10-29T00:11:27.605Z","repository":{"id":83544848,"uuid":"47216067","full_name":"night-codes/bcache","owner":"night-codes","description":"Golang small cache library","archived":false,"fork":false,"pushed_at":"2015-12-02T05:21:49.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T13:46:53.104Z","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":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/night-codes.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}},"created_at":"2015-12-01T20:39:37.000Z","updated_at":"2022-08-01T09:05:47.000Z","dependencies_parsed_at":"2023-05-05T21:32:40.441Z","dependency_job_id":null,"html_url":"https://github.com/night-codes/bcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/night-codes/bcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fbcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fbcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fbcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fbcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/night-codes","download_url":"https://codeload.github.com/night-codes/bcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fbcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281533937,"owners_count":26517933,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-23T18:14:45.747Z","updated_at":"2025-10-29T00:11:27.576Z","avatar_url":"https://github.com/night-codes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bcache\nGolang small cache library\n\n## Use\n\n```golang\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/mirrr/bcache\"\n    \"time\"\n)\n\nfunc main() {\n    cache := bcache.Create()\n    cache.Updater(func(key string) interface{} {\n        if key == \"mykey\" {\n            return 777\n        }\n        return nil\n    })\n    cache.Set(\"mykey2\", 888)\n\n    fmt.Println(cache.Get(\"mykey\"))  // 777\n    fmt.Println(cache.Get(\"mykey2\")) // 888\n\n    time.Sleep(time.Second * 2)\n\n    fmt.Println(cache.Get(\"mykey\"))  //  777\n    fmt.Println(cache.Get(\"mykey2\")) //  \u003cnil\u003e\n}\n```\n\n\\* Any key kept in cache no longer than a second. Byt upon receipt of the value life time is extended for a second. \n\n## Documentation\n[Docs on godoc.org](https://godoc.org/github.com/mirrr/bcache)\n\n\n## License\nDO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\nVersion 2, December 2004\n\nCopyright (C) 2015 Oleksiy Chechel \u003calex.mirrr@gmail.com\u003e\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\nDO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Fbcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnight-codes%2Fbcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Fbcache/lists"}