output cache all the things
This commit is contained in:
@@ -47,6 +47,7 @@ namespace TerribleDev.Blog.Web.Controllers
|
||||
[Route("/")]
|
||||
[Route("/index.html")]
|
||||
[Route("/page/{pageNumber?}" )]
|
||||
[OutputCache(Duration = 31536000, VaryByParam = "pageNumber")]
|
||||
public IActionResult Index(int pageNumber = 1)
|
||||
{
|
||||
if(!postsByPage.TryGetValue(pageNumber, out var result))
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace TerribleDev.Blog.Web.Controllers
|
||||
[Route("/rss")]
|
||||
[Route("/rss.xml")]
|
||||
[ResponseCache(Duration = 7200)]
|
||||
[OutputCache(Duration = 86400)]
|
||||
[OutputCache(Duration = 31536000)]
|
||||
public async Task Rss()
|
||||
{
|
||||
Response.StatusCode = 200;
|
||||
@@ -49,7 +49,7 @@ namespace TerribleDev.Blog.Web.Controllers
|
||||
}
|
||||
[Route("/sitemap.xml")]
|
||||
[ResponseCache(Duration = 7200)]
|
||||
[OutputCache(Duration = 86400)]
|
||||
[OutputCache(Duration = 31536000)]
|
||||
public void SiteMap()
|
||||
{
|
||||
Response.StatusCode = 200;
|
||||
|
||||
Reference in New Issue
Block a user