using Jellyfin.Plugin.SRFPlay.Api.Models;
namespace Jellyfin.Plugin.SRFPlay.Services.Interfaces;
///
/// Interface for caching metadata from SRF API.
///
public interface IMetadataCache
{
///
/// Gets cached media composition by URN.
///
/// The URN.
/// The cache duration in minutes.
/// The cached media composition, or null if not found or expired.
MediaComposition? GetMediaComposition(string urn, int cacheDurationMinutes);
///
/// Sets media composition in cache.
///
/// The URN.
/// The media composition to cache.
void SetMediaComposition(string urn, MediaComposition mediaComposition);
///
/// Removes media composition from cache.
///
/// The URN.
void RemoveMediaComposition(string urn);
///
/// Clears all cached data.
///
void Clear();
///
/// Gets the cache statistics.
///
/// A tuple with cache count and size estimate.
(int Count, long SizeEstimate) GetStatistics();
}