{"id":13438488,"url":"https://github.com/jaysonsantos/bmemcached-rs","last_synced_at":"2025-03-20T06:30:32.742Z","repository":{"id":49369012,"uuid":"54626790","full_name":"jaysonsantos/bmemcached-rs","owner":"jaysonsantos","description":"Rust binary memcached implementation","archived":true,"fork":false,"pushed_at":"2018-08-09T10:52:15.000Z","size":3689,"stargazers_count":26,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-11T16:51:21.516Z","etag":null,"topics":["memcached","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jaysonsantos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-03-24T08:30:34.000Z","updated_at":"2024-06-16T04:49:47.000Z","dependencies_parsed_at":"2022-09-05T13:22:29.873Z","dependency_job_id":null,"html_url":"https://github.com/jaysonsantos/bmemcached-rs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fbmemcached-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fbmemcached-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fbmemcached-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysonsantos%2Fbmemcached-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaysonsantos","download_url":"https://codeload.github.com/jaysonsantos/bmemcached-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244564840,"owners_count":20473142,"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":["memcached","rust-library"],"created_at":"2024-07-31T03:01:05.964Z","updated_at":"2025-03-20T06:30:27.729Z","avatar_url":"https://github.com/jaysonsantos.png","language":"Rust","funding_links":[],"categories":["Libraries","库 Libraries","库"],"sub_categories":["Caching","缓存 Caching","高速缓存"],"readme":"# bmemcached-rs\n\n[![Build Status](https://travis-ci.org/jaysonsantos/bmemcached-rs.svg?branch=master)](https://travis-ci.org/jaysonsantos/bmemcached-rs)\n[![Build status](https://ci.appveyor.com/api/projects/status/ile6fh5ro8so2ctm/branch/master?svg=true)](https://ci.appveyor.com/project/jaysonsantos/bmemcached-rs/branch/master)\n\nRust binary memcached implementation (ON GOING)\n\n# Usage\n```rust\nextern crate bmemcached;\n\nuse std::sync::Arc;\nuse std::thread;\n\nuse bmemcached::MemcachedClient;\n\nfn main() {\n    // Use arc for threading support\n    let client = Arc::new(MemcachedClient::new(vec![\"127.0.0.1:11211\"], 5).unwrap());\n\n    // Traits examples\n    let value = \"value\";\n    client.set(\"string\", value, 1000);\n    let rv: String = client.get(\"string\").unwrap();\n    assert_eq!(rv, \"value\");\n\n    client.set(\"integer\", 10 as u8, 1000);\n    let rv: u8 = client.get(\"integer\").unwrap();\n    assert_eq!(rv, 10 as u8);\n\n    // Threads example\n    let mut threads = vec![];\n    for i in 0..4 {\n        let client = client.clone();\n        threads.push(thread::spawn(move || {\n            let data = format!(\"data_n{}\", i);\n            client.set(\u0026data, \u0026data, 100).unwrap();\n            let val: String = client.get(\u0026data).unwrap();\n            client.delete(\u0026data).unwrap();\n            val\n        }));\n    }\n    for (i, thread) in threads.into_iter().enumerate() {\n        let result = thread.join();\n        assert_eq!(result.unwrap(), format!(\"data_n{}\", i));\n    }\n}\n```\n\n# Why\nI am trying to learn rust by reimplementing a python project that I wrote.\n\n# What works\n* Add\n* Set\n* Replace\n* Get\n* Delete\n* Increment\n* Decrement\n* Consistent Hashing\n* Threading Support\n\n## Trait usage\nOn all supported functions we use traits to be able to send any type of values to memcached.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaysonsantos%2Fbmemcached-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaysonsantos%2Fbmemcached-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaysonsantos%2Fbmemcached-rs/lists"}