feat: first take of adding caching support

This commit is contained in:
Stevan Freeborn
2024-08-15 23:04:45 -05:00
parent c0dec5f7de
commit ed97ea95dc
10 changed files with 293 additions and 46 deletions
+18
View File
@@ -11,6 +11,12 @@ public abstract class Content
/// Gets the type of the content.
/// </summary>
public string Type { get; init; } = string.Empty;
/// <summary>
/// Gets the cache control to be used for the content.
/// </summary>
[JsonPropertyName("cache_control")]
public CacheControl? CacheControl { get; init; }
[JsonConstructor]
internal Content()
@@ -26,4 +32,16 @@ public abstract class Content
{
Type = type;
}
/// <summary>
/// Initializes a new instance of the <see cref="Content"/> class.
/// </summary>
/// <param name="type">The type of the content.</param>
/// <param name="cacheControl">The cache control to be used for the content.</param>
/// <returns>A new instance of the <see cref="Content"/> class.</returns>
protected Content(string type, CacheControl cacheControl)
{
Type = type;
CacheControl = cacheControl;
}
}