summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Caching/ICacheRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Framework/Caching/ICacheRepository.cs')
-rw-r--r--src/SMAPI.Web/Framework/Caching/ICacheRepository.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/Caching/ICacheRepository.cs b/src/SMAPI.Web/Framework/Caching/ICacheRepository.cs
new file mode 100644
index 00000000..5de7e731
--- /dev/null
+++ b/src/SMAPI.Web/Framework/Caching/ICacheRepository.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace StardewModdingAPI.Web.Framework.Caching
+{
+ /// <summary>Encapsulates logic for accessing data in the cache.</summary>
+ internal interface ICacheRepository
+ {
+ /// <summary>Whether cached data is stale.</summary>
+ /// <param name="lastUpdated">The date when the data was updated.</param>
+ /// <param name="staleMinutes">The age in minutes before data is considered stale.</param>
+ bool IsStale(DateTimeOffset lastUpdated, int staleMinutes);
+ }
+}