Radicade Public Code

This commit is contained in:
JogmansonReal
2026-10-16 23:33:13 -07:00
commit 55175acdf6
832 changed files with 363261 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Mvc;
namespace RadicadeServer.CDN
{
internal static class CdnCaching
{
public const string Immutable = "public, max-age=31536000, immutable";
public const string Replaceable = "public, max-age=86400";
public static string ForBlob(string name) =>
name.EndsWith(".assetbundle", StringComparison.OrdinalIgnoreCase) ? Immutable : Replaceable;
public static void Apply(Controller controller, string cacheControl)
{
if (controller.ControllerContext?.HttpContext == null) return;
controller.Response.Headers["Cache-Control"] = cacheControl;
}
}
}