# Class InMemorySettingsSource OptimaJet.Workflow.Core.Runtime.Settings.InMemorySettingsSource Provides an in-memory implementation of [IServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/IServerSettingsSource-T/) for settings of type `T`. Namespace: [OptimaJet.Workflow.Core.Runtime.Settings](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/) ```csharp public class InMemorySettingsSource : IServerSettingsSource where T : new() ``` ## Type Hierarchy - InMemorySettingsSource Current type - [InMemoryMultiServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/InMemoryMultiServerSettingsSource/) - [InMemorySingleServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/InMemorySingleServerSettingsSource/) - Implemented interfaces - [IServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/IServerSettingsSource-T/) ## Constructors `public InMemorySettingsSource(T settings)` Initializes a new instance of the [InMemorySettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/InMemorySettingsSource-T/) class with an initial settings value. ### Parameters | Name | Type | Description | | --- | --- | --- | | `settings` | `{T}` | The initial settings value to hold in memory. | ## Methods `public Task GetSettingsAsync()` Gets the settings currently cached in memory. ### Returns | Type | Description | | --- | --- | | `Task` | A task whose result is the current `T` value. | `public Task SaveSettingsAsync(T settings)` Saves settings to memory, replacing the previously cached value. ### Parameters | Name | Type | Description | | --- | --- | --- | | `settings` | `{T}` | The new settings value to store in memory. | ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous InMemoryMultiServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/InMemoryMultiServerSettingsSource/) [Next InMemorySingleServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/InMemorySingleServerSettingsSource/)