-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/valdisiljuconoks/localization-provider-opti/issues…
…/220
- Loading branch information
Valdis Iljuconoks
committed
Jun 5, 2024
1 parent
4dc0b50
commit 0c614d6
Showing
8 changed files
with
73 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) Valdis Iljuconoks. All rights reserved. | ||
// Licensed under Apache-2.0. See the LICENSE file in the project root for more information | ||
|
||
namespace DbLocalizationProvider.Cache; | ||
|
||
/// <summary> | ||
/// Interface for implementing cache. | ||
/// </summary> | ||
public interface ICache | ||
{ | ||
/// <summary> | ||
/// You should add given value to the cache under given key. | ||
/// </summary> | ||
/// <param name="key">Key identifier of the cached item</param> | ||
/// <param name="value">Actual value fo the cached item</param> | ||
/// <param name="insertIntoKnownResourceKeys">This is pretty internal stuff and should be ignored by cache implementers.</param> | ||
void Insert(string key, object value, bool insertIntoKnownResourceKeys); | ||
|
||
/// <summary> | ||
/// You should implement this method to get cached item back from the underlying storage | ||
/// </summary> | ||
/// <param name="key">Key identifier of the cached item</param> | ||
/// <returns>Actual value fo the cached item. Take care of casting back to proper type.</returns> | ||
object Get(string key); | ||
|
||
/// <summary> | ||
/// If you want to remove the cached item from the storage - this is the method to implement then. | ||
/// </summary> | ||
/// <param name="key">Key identifier of the cached item</param> | ||
void Remove(string key); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters