using System;
namespace StardewModdingAPI.Web.Framework.Caching
{
/// The base logic for a cache repository.
internal abstract class BaseCacheRepository
{
/*********
** Public methods
*********/
/// Whether cached data is stale.
/// The date when the data was updated.
/// The age in minutes before data is considered stale.
public bool IsStale(DateTimeOffset lastUpdated, int staleMinutes)
{
return lastUpdated < DateTimeOffset.UtcNow.AddMinutes(-staleMinutes);
}
}
}