Fix cache items not expiring and change redirect to a temp one as we can now change the base path

This commit is contained in:
Azerelat
2016-01-17 13:19:18 +00:00
parent ea4d0fe701
commit 2901cceea9
2 changed files with 2 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ namespace Jackett.Indexers
protected void CleanCache() protected void CleanCache()
{ {
foreach (var expired in cache.Where(i => i.Created - DateTime.Now > cacheTime).ToList()) foreach (var expired in cache.Where(i => DateTime.Now - i.Created > cacheTime).ToList())
{ {
cache.Remove(expired); cache.Remove(expired);
} }

View File

@@ -26,7 +26,7 @@ namespace Jackett.Utils
if (string.IsNullOrWhiteSpace(url.AbsolutePath) || url.AbsolutePath == "/") if (string.IsNullOrWhiteSpace(url.AbsolutePath) || url.AbsolutePath == "/")
{ {
// 301 is the status code of permanent redirect // 301 is the status code of permanent redirect
context.Response.StatusCode = 301; context.Response.StatusCode = 302;
var redir = Startup.BasePath + "Admin/Dashboard"; var redir = Startup.BasePath + "Admin/Dashboard";
Engine.Logger.Info("redirecting to " + redir); Engine.Logger.Info("redirecting to " + redir);
context.Response.Headers.Set("Location", redir); context.Response.Headers.Set("Location", redir);