From cf035b42372b8504a1964027bce25af868e613bb Mon Sep 17 00:00:00 2001 From: Jakub Kurlowicz Date: Wed, 20 Dec 2023 20:05:16 +0100 Subject: [PATCH] Readme file updated --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index 0e6b6d0..4dc962a 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,57 @@ public interface ICacheService } ``` +### Configuration + +```csharp +public class CacheSettings +{ + /// + /// Determines whether cache is enabled. + /// Default value is true. + /// + public bool CacheEnabled { get; set; } = true; + + /// + /// Cache folder name. + /// Default value is "cache". + /// + public string CacheFolderName { get; set; } = "cache"; + + /// + /// In what units do we specify cache expiration. + /// Default value is Minutes. + /// + public CacheExpirationType CacheExpirationType { get; set; } = CacheExpirationType.Minutes; + + /// + /// After what time the objects in the cache will expire. Based on CacheExpirationType. + /// Default value is 60. + /// + public int CacheExpiration { get; set; } = 60; + + /// + /// Method of storing the cache. + /// Memory - only in memory. + /// MemoryAndFile - In memory while the application is running and in files after the application is closed. + /// Default value is Memory. + /// + public CacheType CacheType { get; set; } = CacheType.Memory; + + /// + /// Initialize cache automatically on startup. + /// Default value is true. + /// + public bool InitializeOnStartup { get; set; } = true; + + /// + /// Before exit, flush the cache data to a files if necessary. + /// Default value is true. + /// + public bool FlushOnExit { get; set; } = true; +} +``` + ### Technologies List of technologies, frameworks and libraries used for implementation: