瀏覽代碼

Added cache to favicon and logo

tags/3.0.0
Teknikode 3 年之前
父節點
當前提交
602ecc9b31
共有 1 個檔案被更改,包括 12 行新增2 行删除
  1. 12
    2
      Teknik/Controllers/DefaultController.cs

+ 12
- 2
Teknik/Controllers/DefaultController.cs 查看文件

@@ -1,7 +1,8 @@
using System;
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.UI;
using Teknik.Areas.Error.Controllers;
using Teknik.Configuration;

@@ -72,7 +73,11 @@ namespace Teknik.Controllers
}

// Get the Favicon
[HttpGet]
[AllowAnonymous]
[OutputCache(
Duration = 31536000,
Location = OutputCacheLocation.ServerAndClient)]
public ActionResult Favicon()
{
// Get favicon
@@ -81,7 +86,11 @@ namespace Teknik.Controllers
}

// Get the Logo
[HttpGet]
[AllowAnonymous]
[OutputCache(
Duration = 31536000,
Location = OutputCacheLocation.ServerAndClient)]
public ActionResult Logo()
{
// Get favicon
@@ -90,6 +99,7 @@ namespace Teknik.Controllers
}

// Get the Robots.txt
[HttpGet]
[AllowAnonymous]
public ActionResult Robots()
{
@@ -134,4 +144,4 @@ namespace Teknik.Controllers
return true;
}
}
}
}

Loading…
取消
儲存