Commit bd20352d authored by Clint Mourlevat's avatar Clint Mourlevat

Fixing response cache bug

parent f7452c5a
...@@ -25,7 +25,7 @@ namespace Stratis.Guru.Controllers ...@@ -25,7 +25,7 @@ namespace Stratis.Guru.Controllers
_stats = JsonConvert.DeserializeObject(_memoryCache.Get("BlockchainStats").ToString()); _stats = JsonConvert.DeserializeObject(_memoryCache.Get("BlockchainStats").ToString());
} }
[ResponseCache(Duration = 60)] [ResponseCache(Duration = 60, NoStore = true)]
public IActionResult Index() public IActionResult Index()
{ {
var latestBlockClient = new RestClient($"{_nakoApiSettings.Endpoint}query/block/Latest/transactions"); var latestBlockClient = new RestClient($"{_nakoApiSettings.Endpoint}query/block/Latest/transactions");
......
...@@ -44,12 +44,6 @@ namespace Stratis.Guru.Controllers ...@@ -44,12 +44,6 @@ namespace Stratis.Guru.Controllers
return View(); return View();
} }
[Route("contact")]
public IActionResult Contact()
{
return View();
}
[Route("vanity")] [Route("vanity")]
public IActionResult Vanity() public IActionResult Vanity()
{ {
......
...@@ -49,6 +49,12 @@ namespace Stratis.Guru ...@@ -49,6 +49,12 @@ namespace Stratis.Guru
//services.AddHostedService<VanityService>(); //services.AddHostedService<VanityService>();
services.AddTransient<UpdateHub>(); services.AddTransient<UpdateHub>();
services.AddSingleton<IAsk, Ask>(); services.AddSingleton<IAsk, Ask>();
services.AddResponseCaching(options =>
{
options.UseCaseSensitivePaths = true;
options.MaximumBodySize = 1024;
});
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment