Files
Orchard/src/Orchard.Web/Modules/Orchard.OutputCache/Views/Statistics/Index.cshtml
2014-10-14 19:59:19 -04:00

38 lines
1.3 KiB
Plaintext

@using Orchard.OutputCache.ViewModels
@model StatisticsViewModel
@{
Layout.Title = T("Cache Statistics");
}
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
<div class="manage">@Html.ActionLink(T("Evict All").ToString(), "EvictAll", new { Area = "Orchard.OutputCache", Controller = "Statistics" }, new { @class = "button primaryAction", itemprop = "UnsafeUrl" })</div>
}
<h2>@T("Cached pages")</h2>
<table class="items">
<thead>
<tr>
<th scope="col">@T("Url")</th>
<th scope="col">@T("Cache Key")</th>
<th scope="col">@T("Cached On")</th>
<th scope="col">@T("Cached Until")</th>
<th scope="col">&nbsp;</th>
</tr>
</thead>
@foreach (var cacheItem in Model.CacheItems) {
<tr>
<td><span title="@cacheItem.QueryString">@cacheItem.Url</span></td>
<td>@cacheItem.CacheKey</td>
<td>@Display.DateTimeRelative(DateTimeUtc: cacheItem.CachedOnUtc)</td>
<td>@cacheItem.ValidUntilUtc.ToLocalTime()</td>
<td>@Html.ActionLink(T("Evict").Text, "Evict", new { Area = "Orchard.OutputCache", Controller = "Statistics", cacheKey = cacheItem.CacheKey })</td>
</tr>
}
</table>
@Display(Model.Pager)