Skip to content

Commit

Permalink
Readme file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kubagdynia committed Dec 20, 2023
1 parent f507a61 commit cf035b4
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,57 @@ public interface ICacheService
}
```

### Configuration

```csharp
public class CacheSettings
{
/// <summary>
/// Determines whether cache is enabled.
/// Default value is true.
/// </summary>
public bool CacheEnabled { get; set; } = true;

/// <summary>
/// Cache folder name.
/// Default value is "cache".
/// </summary>
public string CacheFolderName { get; set; } = "cache";

/// <summary>
/// In what units do we specify cache expiration.
/// Default value is Minutes.
/// </summary>
public CacheExpirationType CacheExpirationType { get; set; } = CacheExpirationType.Minutes;

/// <summary>
/// After what time the objects in the cache will expire. Based on CacheExpirationType.
/// Default value is 60.
/// </summary>
public int CacheExpiration { get; set; } = 60;

/// <summary>
/// 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.
/// </summary>
public CacheType CacheType { get; set; } = CacheType.Memory;

/// <summary>
/// Initialize cache automatically on startup.
/// Default value is true.
/// </summary>
public bool InitializeOnStartup { get; set; } = true;

/// <summary>
/// Before exit, flush the cache data to a files if necessary.
/// Default value is true.
/// </summary>
public bool FlushOnExit { get; set; } = true;
}
```


### Technologies
List of technologies, frameworks and libraries used for implementation:
Expand Down

0 comments on commit cf035b4

Please sign in to comment.