Browse Source

Added cache to favicon and logo

tags/3.0.0
Teknikode 1 year ago
parent
commit
602ecc9b31
1 changed files with 12 additions and 2 deletions
  1. 12
    2
      Teknik/Controllers/DefaultController.cs

+ 12
- 2
Teknik/Controllers/DefaultController.cs View File

@@ -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…
Cancel
Save