Converted to IOptions over IOptionsSnapshot due to the latter only working in scoped services.
Further amends to return to booting application.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
// it's too late for UmbracoContext which has captured previewDefault and stuff into these ctor vars
|
||||
// but, no, UmbracoContext returns snapshot.Content which comes from elements SO a resync should create a new cache
|
||||
|
||||
public ContentCache(bool previewDefault, ContentStore.Snapshot snapshot, IAppCache snapshotCache, IAppCache elementsCache, IDomainCache domainCache, IOptionsSnapshot<GlobalSettings> globalSettings, IVariationContextAccessor variationContextAccessor)
|
||||
public ContentCache(bool previewDefault, ContentStore.Snapshot snapshot, IAppCache snapshotCache, IAppCache elementsCache, IDomainCache domainCache, IOptions<GlobalSettings> globalSettings, IVariationContextAccessor variationContextAccessor)
|
||||
: this(previewDefault, snapshot, snapshotCache, elementsCache, domainCache, globalSettings.Value, variationContextAccessor)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -87,14 +87,14 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository,
|
||||
IDefaultCultureAccessor defaultCultureAccessor,
|
||||
IDataSource dataSource,
|
||||
IOptionsSnapshot<GlobalSettings> globalSettings,
|
||||
IOptions<GlobalSettings> globalSettings,
|
||||
IEntityXmlSerializer entitySerializer,
|
||||
IPublishedModelFactory publishedModelFactory,
|
||||
UrlSegmentProviderCollection urlSegmentProviders,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IShortStringHelper shortStringHelper,
|
||||
IIOHelper ioHelper,
|
||||
IOptionsSnapshot<NuCacheSettings> config)
|
||||
IOptions<NuCacheSettings> config)
|
||||
: base(publishedSnapshotAccessor, variationContextAccessor)
|
||||
{
|
||||
//if (Interlocked.Increment(ref _singletonCheck) > 1)
|
||||
|
||||
Reference in New Issue
Block a user