{"id":29554699,"url":"https://github.com/kadirdemirkaya/caching","last_synced_at":"2026-01-20T16:59:46.283Z","repository":{"id":303987228,"uuid":"835912843","full_name":"kadirdemirkaya/Caching","owner":"kadirdemirkaya","description":"It supports both in-memory and distributed caching (like Redis). It helps manage cache easily","archived":false,"fork":false,"pushed_at":"2025-07-10T15:55:21.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T09:48:17.743Z","etag":null,"topics":["cache","inmemory","redis"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Base.Caching","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/kadirdemirkaya.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-30T19:18:53.000Z","updated_at":"2025-07-10T17:12:00.000Z","dependencies_parsed_at":"2025-07-10T20:54:43.096Z","dependency_job_id":null,"html_url":"https://github.com/kadirdemirkaya/Caching","commit_stats":null,"previous_names":["kadirdemirkaya/caching"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kadirdemirkaya/Caching","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FCaching","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FCaching/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FCaching/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FCaching/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadirdemirkaya","download_url":"https://codeload.github.com/kadirdemirkaya/Caching/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FCaching/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270063166,"owners_count":24520698,"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-08-12T02:00:09.011Z","response_time":80,"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":["cache","inmemory","redis"],"created_at":"2025-07-18T07:31:08.970Z","updated_at":"2026-01-20T16:59:46.277Z","avatar_url":"https://github.com/kadirdemirkaya.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caching Library for .NET\n\nThis project is a caching library for .NET applications.\nIt supports both in-memory and distributed caching (like Redis).\nIt helps manage cache easily in high-performance scenarios.\n\n\n## ⚙️ Features\n\n- 🧠 In‑memory cache (memory‑based)\n- 🌐 Distributed cache (for example Redis)\n- 🔄 Custom cache duration (per key or global)\n- 🔁 Automatic cache key handling\n- 🔧 Easy setup using services.AddCaching()\n\n\n## 🚀 Start / Usage Example\n\n```csharp\n// In Startup.cs or Program.cs:\nservices.AddCaching(configuration);\n\n// Usage in a service:\npublic class MyService\n{\n    private readonly ICacheManager _cacheManager;\n\n    public MyService(ICacheManager cacheManager)\n    {\n        _cacheManager = cacheManager;\n    }\n\n    public async Task CacheTestExample()\n    {\n        var cacheKey = new CacheKey(CacheKeyConstants.DefaultKey, \"default\");\n        var preparedKey = _cacheManager.PrepareKey(cacheKey, \"def\", \"de\");\n\n        var cachedUser = await _cacheManager.GetAsync\u003cUser\u003e(preparedKey, async () =\u003e\n        {\n            return new User\n            {\n                Age = 12,\n                Name = \"Kadir\",\n                Role = \"Admin\"\n            };\n        });\n\n        Console.WriteLine($\"Cached User: {cachedUser.Name}, Role: {cachedUser.Role}\");\n    }\n}\n\n```\n\n## 🧩 Project Structure\n\n- **/Shared**   : Contains shared helper classes and models.\n\n- **/Library**  : Contains core cache services, configuration, and extensions.\n\n- **/Test**     : Includes unit tests written with NUnit.\n\n\n## 🛠️ Installation and Operation\n\n```\ngit clone https://github.com/kadirdemirkaya/Caching.git\ncd Caching\n\n# Build library\ndotnet build\n\n# Pack \ndotnet pack -c Release\n\n# This package will be extracted to the output folder as .nupkg and used as a home library.\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirdemirkaya%2Fcaching","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadirdemirkaya%2Fcaching","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirdemirkaya%2Fcaching/lists"}