mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-03-05 13:20:20 -05:00
Use current time for cache break in development
This commit is contained in:
committed by
Mark McDowall
parent
3ddc6ac6de
commit
020ed32fcf
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common.Crypto;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
namespace Sonarr.Http.Frontend.Mappers
|
||||
@@ -28,6 +30,11 @@ namespace Sonarr.Http.Frontend.Mappers
|
||||
return resourceUrl;
|
||||
}
|
||||
|
||||
if (!RuntimeInfo.IsProduction)
|
||||
{
|
||||
return resourceUrl + "?t=" + DateTime.UtcNow.Ticks;
|
||||
}
|
||||
|
||||
var mapper = _diskMappers.Single(m => m.CanHandle(resourceUrl));
|
||||
var pathToFile = mapper.Map(resourceUrl);
|
||||
var hash = _hashProvider.ComputeMd5(pathToFile).ToBase64();
|
||||
|
||||
Reference in New Issue
Block a user