{"id":28878381,"url":"https://github.com/taiizor/garnetwrapper","last_synced_at":"2026-05-04T23:34:17.396Z","repository":{"id":295352732,"uuid":"913348869","full_name":"Taiizor/GarnetWrapper","owner":"Taiizor","description":"A high-performance .NET wrapper for Microsoft Research's Garnet cache-store. This library provides a robust, feature-rich interface for interacting with Garnet cache, including support for compression, circuit breaking, and comprehensive metrics collection.","archived":false,"fork":false,"pushed_at":"2025-01-07T16:07:10.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-06-20T17:14:04.266Z","etag":null,"topics":["cache","caching","distributed","distributed-cache","dotnet","garnet","redis","wrapper"],"latest_commit_sha":null,"homepage":"https://www.vegalya.com","language":"C#","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/Taiizor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2025-01-07T14:11:06.000Z","updated_at":"2025-05-05T20:58:36.000Z","dependencies_parsed_at":"2025-05-29T12:16:53.935Z","dependency_job_id":null,"html_url":"https://github.com/Taiizor/GarnetWrapper","commit_stats":null,"previous_names":["taiizor/garnetwrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Taiizor/GarnetWrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taiizor%2FGarnetWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taiizor%2FGarnetWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taiizor%2FGarnetWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taiizor%2FGarnetWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Taiizor","download_url":"https://codeload.github.com/Taiizor/GarnetWrapper/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taiizor%2FGarnetWrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32628830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: 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":["cache","caching","distributed","distributed-cache","dotnet","garnet","redis","wrapper"],"created_at":"2025-06-20T17:14:00.786Z","updated_at":"2026-05-04T23:34:17.390Z","avatar_url":"https://github.com/Taiizor.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GarnetWrapper\n\nA high-performance .NET wrapper for Microsoft Research's Garnet cache-store. This library provides a robust, feature-rich interface for interacting with Garnet cache, including support for compression, circuit breaking, and comprehensive metrics collection.\n\n## Features\n\n- 🚀 High-performance async operations\n- 🔄 Circuit breaker pattern for fault tolerance\n- 📊 Built-in metrics collection\n- 🗜️ Optional compression support\n- 🔒 Distributed locking capabilities\n- ⚡ Connection pooling and multiplexing\n- 📈 Health monitoring\n- 🔍 Comprehensive logging\n\n## Installation\n\n```bash\ndotnet add package GarnetWrapper\n```\n\n## Quick Start\n\n```csharp\n// Add services to DI container\nservices.AddGarnetCache(options =\u003e\n{\n    options.Endpoints = new[] { \"localhost:6379\" };\n    options.DefaultDatabase = 0;\n    options.EnableCompression = true;\n});\n\n// Inject and use in your code\npublic class MyService\n{\n    private readonly IGarnetClient _cache;\n\n    public MyService(IGarnetClient cache)\n    {\n        _cache = cache;\n    }\n\n    public async Task\u003cUser\u003e GetUserAsync(string userId)\n    {\n        return await _cache.GetAsync\u003cUser\u003e($\"user:{userId}\");\n    }\n}\n```\n\n## Configuration Options\n\n```csharp\npublic class GarnetOptions\n{\n    public string[] Endpoints { get; set; }\n    public int DefaultDatabase { get; set; }\n    public bool EnableCompression { get; set; }\n    public TimeSpan DefaultExpiry { get; set; }\n    public int MaxRetries { get; set; }\n    public int RetryTimeout { get; set; }\n}\n```\n\n## Advanced Usage\n\n### Distributed Locking\n\n```csharp\n// Acquire a lock\nawait _cache.LockAsync(\"my-lock-key\", TimeSpan.FromMinutes(1));\n\n// Release the lock\nawait _cache.UnlockAsync(\"my-lock-key\");\n```\n\n### Pattern Scanning\n\n```csharp\nawait foreach (string key in _cache.ScanAsync(\"user:*\"))\n{\n    // Process each key\n}\n```\n\n### Metrics\n\nThe library includes built-in metrics collection using App.Metrics:\n\n- Operation latency\n- Cache hits/misses\n- Error rates\n- Circuit breaker status\n\n## Health Checks\n\nBuilt-in health checks are available and can be configured with ASP.NET Core:\n\n```csharp\nservices.AddHealthChecks()\n    .AddGarnetCheck();\n```\n\n## Performance\n\nBenchmark results for basic operations (runs on typical development machine):\n\n| Operation    | Mean      | Error    | StdDev   |\n|-------------|-----------|----------|-----------|\n| Set         | 152.3 μs  | 15.23 μs | 0.89 μs  |\n| Get         | 148.7 μs  | 14.87 μs | 0.87 μs  |\n| Delete      | 149.1 μs  | 14.91 μs | 0.88 μs  |\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiizor%2Fgarnetwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaiizor%2Fgarnetwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiizor%2Fgarnetwrapper/lists"}