using Jellyfin.Plugin.SRFPlay.Api.Models;

namespace Jellyfin.Plugin.SRFPlay.Services.Interfaces;

/// <summary>
/// Interface for caching metadata from SRF API.
/// </summary>
public interface IMetadataCache
{
    /// <summary>
    /// Gets cached media composition by URN.
    /// </summary>
    /// <param name="urn">The URN.</param>
    /// <param name="cacheDurationMinutes">The cache duration in minutes.</param>
    /// <returns>The cached media composition, or null if not found or expired.</returns>
    MediaComposition? GetMediaComposition(string urn, int cacheDurationMinutes);

    /// <summary>
    /// Sets media composition in cache.
    /// </summary>
    /// <param name="urn">The URN.</param>
    /// <param name="mediaComposition">The media composition to cache.</param>
    void SetMediaComposition(string urn, MediaComposition mediaComposition);

    /// <summary>
    /// Clears all cached data.
    /// </summary>
    void Clear();
}
