Cache cleanup implemented

This commit is contained in:
Joseph Milazzo 2021-01-11 15:39:25 -06:00
parent f737f662df
commit 731e3a9c5e
11 changed files with 132 additions and 29 deletions

View file

@ -13,9 +13,18 @@ namespace API.Interfaces
/// <returns>Volume for the passed volumeId. Side-effect from ensuring cache.</returns>
Task<Volume> Ensure(int volumeId);
bool Cleanup(Volume volume);
/// <summary>
/// Clears cache directory of all folders and files.
/// </summary>
/// <param name="volume"></param>
void Cleanup();
//bool CleanupAll();
/// <summary>
/// Clears cache directory of all volumes that belong to a given library.
/// </summary>
/// <param name="libraryId"></param>
void CleanupLibrary(int libraryId, int[] volumeIds);
/// <summary>
/// Returns the absolute path of a cached page.

View file

@ -18,5 +18,7 @@ namespace API.Interfaces
Task<SeriesDto> GetSeriesDtoByIdAsync(int seriesId);
Task<Volume> GetVolumeAsync(int volumeId);
Task<IEnumerable<Volume>> GetVolumesForSeriesAsync(int[] seriesIds);
}
}