#nullable disable using System; using StardewModdingAPI.Toolkit.Framework.UpdateData; namespace StardewModdingAPI.Web.Framework.Caching.Mods { /// Manages cached mod data. internal interface IModCacheRepository : ICacheRepository { /********* ** Methods *********/ /// Get the cached mod data. /// The mod site to search. /// The mod's unique ID within the . /// The fetched mod. /// Whether to update the mod's 'last requested' date. bool TryGetMod(ModSiteKey site, string id, out Cached mod, bool markRequested = true); /// Save data fetched for a mod. /// The mod site on which the mod is found. /// The mod's unique ID within the . /// The mod data. void SaveMod(ModSiteKey site, string id, IModPage mod); /// Delete data for mods which haven't been requested within a given time limit. /// The minimum age for which to remove mods. void RemoveStaleMods(TimeSpan age); } }