Added a basic cache service to handle interations with the underlying cache implementation. Refactored some code to be more robust.
This commit is contained in:
parent
59a4921ba9
commit
cd8a1d2892
8 changed files with 149 additions and 34 deletions
21
API/Interfaces/ICacheService.cs
Normal file
21
API/Interfaces/ICacheService.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using API.Entities;
|
||||
|
||||
namespace API.Interfaces
|
||||
{
|
||||
public interface ICacheService
|
||||
{
|
||||
/// <summary>
|
||||
/// Ensures the cache is created for the given volume and if not, will create it.
|
||||
/// </summary>
|
||||
/// <param name="volumeId"></param>
|
||||
void Ensure(int volumeId);
|
||||
|
||||
bool Cleanup(Volume volume);
|
||||
|
||||
//bool CleanupAll();
|
||||
|
||||
string GetCachePath(int volumeId);
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue