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