From 89f7b046160af45336ed681f222ec69d115b0715 Mon Sep 17 00:00:00 2001 From: Chintan Shah Date: Fri, 14 Jun 2024 10:10:57 +0530 Subject: [PATCH] Add caching service interfaces Introduced two new interfaces in the Promact.Core.Caching namespace to enhance caching capabilities. The ICachingService interface defines methods for setting, getting, and removing cache values. The ICachingUniqueKeyGenerationService interface provides a method for generating unique cache keys based on provided keys. --- Caching/ICachingService.cs | 9 +++++++++ Caching/ICachingUniqueKeyGenerationService.cs | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 Caching/ICachingService.cs create mode 100644 Caching/ICachingUniqueKeyGenerationService.cs diff --git a/Caching/ICachingService.cs b/Caching/ICachingService.cs new file mode 100644 index 0000000..e321459 --- /dev/null +++ b/Caching/ICachingService.cs @@ -0,0 +1,9 @@ +namespace Promact.Core.Caching +{ + public interface ICachingService + { + void Set(string key, T value); + T Get(string key); + void Remove(string key); + } +} diff --git a/Caching/ICachingUniqueKeyGenerationService.cs b/Caching/ICachingUniqueKeyGenerationService.cs new file mode 100644 index 0000000..d06a8e2 --- /dev/null +++ b/Caching/ICachingUniqueKeyGenerationService.cs @@ -0,0 +1,7 @@ +namespace Promact.Core.Caching +{ + public interface ICachingUniqueKeyGenerationService + { + string GenerateUniqueKey(string key); + } +}