using System.Threading.Tasks;
using API.Entities;
namespace API.Interfaces
{
public interface ICacheService
{
///
/// Ensures the cache is created for the given volume and if not, will create it. Should be called before any other
/// cache operations (except cleanup).
///
///
/// Volume for the passed volumeId. Side-effect from ensuring cache.
Task Ensure(int volumeId);
///
/// Clears cache directory of all folders and files.
///
///
void Cleanup();
///
/// Clears cache directory of all volumes that belong to a given library.
///
///
void CleanupLibrary(int libraryId, int[] volumeIds);
///
/// Returns the absolute path of a cached page.
///
///
/// Page number to look for
///
string GetCachedPagePath(Volume volume, int page);
}
}