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
+14
View File
@@ -31,4 +31,18 @@ public class TextContent : Content
Text = text;
}
/// <summary>
/// Initializes a new instance of the <see cref="TextContent"/> class.
/// </summary>
/// <param name="text">The text 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="TextContent"/> class.</returns>
/// <exception cref="ArgumentNullException">Thrown when the text or cache control is null.</exception>
public TextContent(string text, CacheControl cacheControl) : base(ContentType.Text, cacheControl)
{
ArgumentValidator.ThrowIfNull(text, nameof(text));
Text = text;
}
}