{"id":29915662,"url":"https://github.com/guildofcalamity/easycache","last_synced_at":"2026-04-16T11:03:04.724Z","repository":{"id":300471155,"uuid":"867875705","full_name":"GuildOfCalamity/EasyCache","owner":"GuildOfCalamity","description":"A time-based object-caching helper library for your projects.","archived":false,"fork":false,"pushed_at":"2025-06-24T20:38:44.000Z","size":1062,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T03:40:53.830Z","etag":null,"topics":["cache","cache-control","cache-storage","cachemanager","csharp","dll","dotnet-core","dotnet-framework","helper-library","library","memory-cache"],"latest_commit_sha":null,"homepage":"","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/GuildOfCalamity.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-10-04T22:50:24.000Z","updated_at":"2025-06-24T20:38:47.000Z","dependencies_parsed_at":"2025-06-21T22:37:20.864Z","dependency_job_id":null,"html_url":"https://github.com/GuildOfCalamity/EasyCache","commit_stats":null,"previous_names":["guildofcalamity/easycache"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GuildOfCalamity/EasyCache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuildOfCalamity%2FEasyCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuildOfCalamity%2FEasyCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuildOfCalamity%2FEasyCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuildOfCalamity%2FEasyCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuildOfCalamity","download_url":"https://codeload.github.com/GuildOfCalamity/EasyCache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuildOfCalamity%2FEasyCache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31882886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cache","cache-control","cache-storage","cachemanager","csharp","dll","dotnet-core","dotnet-framework","helper-library","library","memory-cache"],"created_at":"2025-08-02T03:16:38.026Z","updated_at":"2026-04-16T11:03:04.719Z","avatar_url":"https://github.com/GuildOfCalamity.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Icon](AppIcon.png) \r\n# EasyCache\r\n\r\n\r\n\r\n## v2.0.0.0 - October 2024\r\n**Dependencies**\r\n\r\n| Assembly | Version |\r\n| ---- | ---- |\r\n| NET Core | 6.0 (LTS) |\r\n| NET Framework | 4.8.1 |\r\n| System.Runtime.Caching | 8.0.0.1 |\r\n\r\n- A [memory caching](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.caching.memorycache?view=net-6.0) library which offers timed evictions for stored objects.\r\n- I've also created my own version of Microsoft's memory cache to show how you could roll your own.\r\n\r\n- This solution includes a console application for testing the DLL.\r\n\r\n## Usage\r\n\r\n```csharp\r\n\r\n // Instantiate\r\n var cache = new CacheHelper\u003cstring\u003e();\r\n\r\n // Add an item\r\n cache.AddOrUpdate(\"key1\", \"value1\", TimeSpan.FromSeconds(3));\r\n // Add an item to update\r\n cache.AddOrUpdate(\"key3\", \"value3\", DateTime.Now.AddMinutes(1));\r\n // Update an item\r\n cache.AddOrUpdate(\"key3\", \"updated value3\", DateTime.Now.AddMinutes(2));\r\n\r\n // Check expiry\r\n var dt = cache.GetExpiration(\"key3\");\r\n Console.WriteLine($\"key3 will expire at {dt.Value.ToLongTimeString()}\");\r\n\r\n // Check if exists\r\n Console.WriteLine($\"The current cache does {(cache.Contains(\"key1\") ? \"\" : \"not\")} contain key1\");\r\n\r\n // Refresh the expiration by fetching\r\n var temp = cache.Get(\"key1\");\r\n\r\n // Delete an item\r\n cache.Remove(\"key1\");\r\n\r\n // Check if exists after removal\r\n Console.WriteLine($\"The current cache does {(cache.Contains(\"key1\") ? \"\" : \"not\")} contain key1\");\r\n\r\n // Fetching all keys\r\n var keys = cache.GetAllKeys();\r\n foreach (var key in keys) { /* do something */ }\r\n\r\n // Fetching all objects\r\n var objs = cache.GetCacheAsEnumerable();\r\n foreach (var obj in objs) { /* do something */ }\r\n\r\n // Clean-up\r\n cache.Dispose();\r\n\r\n```\r\n\r\n## 📷 Screenshot\r\n\r\n![Sample](./Screenshot.png)\r\n\r\n## 🧾 License/Warranty\r\n* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish and distribute copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n* The software is provided \"as is\", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the author or copyright holder be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.\r\n* Copyright © 2025. All rights reserved.\r\n\r\n## 📋 Proofing\r\n* This application was compiled and tested using *VisualStudio* 2022 on *Windows 10/11* versions **22H2**, **21H2**, **21H1**, and **23H2**.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguildofcalamity%2Feasycache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguildofcalamity%2Feasycache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguildofcalamity%2Feasycache/lists"}