{"id":36454336,"url":"https://github.com/hqbobo/dcache","last_synced_at":"2026-01-11T23:01:21.750Z","repository":{"id":88982756,"uuid":"187991649","full_name":"hqbobo/dcache","owner":"hqbobo","description":"distribute cache base on redis","archived":false,"fork":false,"pushed_at":"2019-05-27T08:20:12.000Z","size":2461,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T20:06:57.370Z","etag":null,"topics":["distributed-storage","golang","redis"],"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/hqbobo.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":"2019-05-22T08:02:00.000Z","updated_at":"2019-06-12T07:28:05.000Z","dependencies_parsed_at":"2023-06-13T10:30:12.874Z","dependency_job_id":null,"html_url":"https://github.com/hqbobo/dcache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hqbobo/dcache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqbobo%2Fdcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqbobo%2Fdcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqbobo%2Fdcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqbobo%2Fdcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hqbobo","download_url":"https://codeload.github.com/hqbobo/dcache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqbobo%2Fdcache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28326166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["distributed-storage","golang","redis"],"created_at":"2026-01-11T23:01:21.670Z","updated_at":"2026-01-11T23:01:21.733Z","avatar_url":"https://github.com/hqbobo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Dcache  \n  \n## Description  \n  \n\u003edistribute cache implement with redis. local memory is also used which can speed up get operation.\u003cbr\u003e\nmain function as below\n\n1. support redis and redis cluster mode  \n2. support local cache. all set operation will remian a copy of data in memory(with timeout).\n3. All dcache client will get a copy of data after set opertion and save in their own memory(with timeout).\n4. All data has been marshelled into json, feel free to store struct stuff\n5. Set your own logger and TextSerialize\n\n\n##Detail\n\u003e Option\n```$xslt\ntype Options struct {\n\tIp          string        //redis server ip\n\tPort        int           //redis server port\n\tPass        string        //redis server password\n\tDb          int           //redis server db\n\tPoolSize    int           //redis server clientpool size\n\tClusterMode bool          //redis server running cluster mode?\n\tSerialize   TextSerialize //interface used to marshal object into text\n\tLogger      Logger        //interface used for log\n}\n```\n\n\u003e TextSerialize\n\nyou can design your own TextSerialize if speed is concerned\n```$xslt\ntype TextSerialize interface {\n\tMarshal(o interface{}) (string, error)\n\tUnmarshal(data []byte, v interface{}) error\n}\n```\n\n\u003e Logger\n\nfit to the log system that you are familiar with\n```$xslt\ntype Logger interface {\n\tDebug(v ...interface{})\n\tInfo(v ...interface{})\n\tNotice(v ...interface{})\n\tWarn(v ...interface{})\n\tError(v ...interface{})\n\tPanic(v ...interface{})\n}\n```\n\n## Example  \n\u003e [Source Code](https://github.com/hqbobo/dcache/example)  see in the example directory\n```\npackage main\n\nimport (\n\t\"github.com/hqbobo/dcache\"\n)\n\nfunc main() {\n\tdcache.Init(dcache.Options{\n\t\tIp:          \"127.0.0.1\",\n\t\tPort:        6379,\n\t\tPass:        \"\",\n\t\tDb:          1,\n\t\tPoolSize:    10,\n\t\tClusterMode: false,\n\t})\n\tvar val string\n\tdcache.GetCache().Get(\"aaaa\", \u0026val)\n\tdcache.GetCache().Set(\"aaaa\", \"bbbb\", 100)\n\tdcache.GetCache().Get(\"aaaa\", \u0026val)\n\tselect {}\n\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhqbobo%2Fdcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhqbobo%2Fdcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhqbobo%2Fdcache/lists"}