public override ItemDefinition GetItemDefinition(ID itemId, Sitecore.Data.DataProviders.CallContext context) { if (_cacheClearer == null) { lock (_lockObj) { if (_cacheClearer == null) { _cacheClearer = new MongoOplogCacheClearer(this.ConnectionString, this.MongoDatabase, this.Collection, this.MappingCollection); new Thread(_cacheClearer.Start).Start(); } } } if (!_initialized) { lock (_lockObj) { if (!_initialized) { _cacheClearer.AddDatabase(this.Database); _initialized = true; } } } return(null); }
public override ItemDefinition GetItemDefinition(ID itemId, Sitecore.Data.DataProviders.CallContext context) { if (_cacheClearer == null) { lock (_lockObj) { if (_cacheClearer == null) { _cacheClearer = new MongoOplogCacheClearer(this.ConnectionString, this.MongoDatabase, this.Collection, this.MappingCollection); new Thread(_cacheClearer.Start).Start(); } } } if (!_initialized) { lock (_lockObj) { if (!_initialized) { _cacheClearer.AddDatabase(this.Database); _initialized = true; } } } return null; }