From a7ecdfb52c1d0406cec55e8dcee13f5fc0d52b8f Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Tue, 27 Aug 2019 00:21:48 +0800 Subject: Add max-age. --- Timeline/Controllers/UserAvatarController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Timeline/Controllers/UserAvatarController.cs') diff --git a/Timeline/Controllers/UserAvatarController.cs b/Timeline/Controllers/UserAvatarController.cs index 59615371..bbfad6af 100644 --- a/Timeline/Controllers/UserAvatarController.cs +++ b/Timeline/Controllers/UserAvatarController.cs @@ -80,7 +80,7 @@ namespace Timeline.Controllers var avatarInfo = await _service.GetAvatar(username); var avatar = avatarInfo.Avatar; - Response.Headers.Add("Cache-Control", "no-cache, must-revalidate"); + Response.Headers.Add("Cache-Control", "no-cache, must-revalidate, max-age=1"); return File(avatar.Data, avatar.Type, new DateTimeOffset(avatarInfo.LastModified), eTag); } catch (UserNotExistException e) -- cgit v1.2.3