View Source
Class ContentStore
Stores content in memory and persists it back to disk
Inheritance
System.Object
Assembly: Umbraco.PublishedCache.NuCache.dll
Syntax
public class ContentStore
Constructors
View Source
ContentStore(IPublishedSnapshotAccessor, IVariationContextAccessor, ILogger, ILoggerFactory, IPublishedModelFactory, Nullable<BPlusTree<Int32, ContentNodeKit>>)
Declaration
public ContentStore(IPublishedSnapshotAccessor publishedSnapshotAccessor, IVariationContextAccessor variationContextAccessor, ILogger logger, ILoggerFactory loggerFactory, IPublishedModelFactory publishedModelFactory, BPlusTree<int, ContentNodeKit>? localDb = null)
Parameters
Type |
Name |
Description |
IPublishedSnapshotAccessor |
publishedSnapshotAccessor |
|
IVariationContextAccessor |
variationContextAccessor |
|
ILogger |
logger |
|
ILoggerFactory |
loggerFactory |
|
IPublishedModelFactory |
publishedModelFactory |
|
System.Nullable<BPlusTree<System.Int32, ContentNodeKit>> |
localDb |
|
Properties
View Source
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
View Source
GenCount
Declaration
public long GenCount { get; }
Property Value
Type |
Description |
System.Int64 |
|
View Source
LiveSnapshot
Declaration
public ContentStore.Snapshot LiveSnapshot { get; }
Property Value
View Source
SnapCount
Declaration
public long SnapCount { get; }
Property Value
Type |
Description |
System.Int64 |
|
Methods
View Source
ClearLocked(Int32)
Clears data for a given node id
Declaration
public bool ClearLocked(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
CollectAsync()
Declaration
public Task CollectAsync()
Returns
View Source
CreateSnapshot()
Declaration
public ContentStore.Snapshot CreateSnapshot()
Returns
View Source
Get(Guid, Int64)
Declaration
public ContentNode Get(Guid uid, long gen)
Parameters
Type |
Name |
Description |
Guid |
uid |
|
System.Int64 |
gen |
|
Returns
View Source
Get(Int32, Int64)
Declaration
public ContentNode Get(int id, long gen)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int64 |
gen |
|
Returns
View Source
GetAll(Int64)
Declaration
public IEnumerable<ContentNode> GetAll(long gen)
Parameters
Type |
Name |
Description |
System.Int64 |
gen |
|
Returns
View Source
GetAtRoot(Int64)
Declaration
public IEnumerable<ContentNode> GetAtRoot(long gen)
Parameters
Type |
Name |
Description |
System.Int64 |
gen |
|
Returns
View Source
GetContentType(Guid, Int64)
Declaration
public IPublishedContentType? GetContentType(Guid key, long gen)
Parameters
Type |
Name |
Description |
Guid |
key |
|
System.Int64 |
gen |
|
Returns
Type |
Description |
System.Nullable<IPublishedContentType> |
|
View Source
GetContentType(Int32, Int64)
Declaration
public IPublishedContentType? GetContentType(int id, long gen)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int64 |
gen |
|
Returns
Type |
Description |
System.Nullable<IPublishedContentType> |
|
View Source
GetContentType(String, Int64)
Declaration
public IPublishedContentType? GetContentType(string alias, long gen)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
System.Int64 |
gen |
|
Returns
Type |
Description |
System.Nullable<IPublishedContentType> |
|
View Source
GetScopedWriteLock(ICoreScopeProvider)
Declaration
public IDisposable? GetScopedWriteLock(ICoreScopeProvider scopeProvider)
Parameters
Type |
Name |
Description |
ICoreScopeProvider |
scopeProvider |
|
Returns
Type |
Description |
System.Nullable<IDisposable> |
|
View Source
IsEmpty(Int64)
Declaration
public bool IsEmpty(long gen)
Parameters
Type |
Name |
Description |
System.Int64 |
gen |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
NewContentTypesLocked(IEnumerable<IPublishedContentType>)
Sets data for new content types
Declaration
public void NewContentTypesLocked(IEnumerable<IPublishedContentType> types)
Parameters
Type |
Name |
Description |
IEnumerable<IPublishedContentType> |
types |
|
View Source
ReleaseLocalDb()
Declaration
public void ReleaseLocalDb()
View Source
SetAllContentTypesLocked(Nullable<IEnumerable<IPublishedContentType>>)
Updates/sets data for all content types
Declaration
public void SetAllContentTypesLocked(IEnumerable<IPublishedContentType>? types)
Parameters
Type |
Name |
Description |
System.Nullable<IEnumerable<IPublishedContentType>> |
types |
|
View Source
SetAllFastSortedLocked(IEnumerable<ContentNodeKit>, Boolean)
Builds all kits on startup using a fast forward only cursor
Declaration
public bool SetAllFastSortedLocked(IEnumerable<ContentNodeKit> kits, bool fromDb)
Parameters
Type |
Name |
Description |
IEnumerable<ContentNodeKit> |
kits |
All kits sorted by Level + Parent Id + Sort order
|
System.Boolean |
fromDb |
True if the data is coming from the database (not the local cache db)
|
Returns
Type |
Description |
System.Boolean |
|
View Source
SetAllFastSortedLocked(IEnumerable<ContentNodeKit>, Int32, Boolean)
Builds all kits on startup using a fast forward only cursor
Declaration
public bool SetAllFastSortedLocked(IEnumerable<ContentNodeKit> kits, int kitGroupSize, bool fromDb)
Parameters
Type |
Name |
Description |
IEnumerable<ContentNodeKit> |
kits |
All kits sorted by Level + Parent Id + Sort order
|
System.Int32 |
kitGroupSize |
|
System.Boolean |
fromDb |
True if the data is coming from the database (not the local cache db)
|
Returns
Type |
Description |
System.Boolean |
|
View Source
SetAllLocked(IEnumerable<ContentNodeKit>)
Declaration
public bool SetAllLocked(IEnumerable<ContentNodeKit> kits)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
SetAllLocked(IEnumerable<ContentNodeKit>, Int32, Boolean)
Declaration
public bool SetAllLocked(IEnumerable<ContentNodeKit> kits, int kitGroupSize, bool fromDb)
Parameters
Type |
Name |
Description |
IEnumerable<ContentNodeKit> |
kits |
|
System.Int32 |
kitGroupSize |
|
System.Boolean |
fromDb |
True if the data is coming from the database (not the local cache db)
|
Returns
Type |
Description |
System.Boolean |
|
View Source
SetBranchLocked(Int32, IEnumerable<ContentNodeKit>)
Declaration
public bool SetBranchLocked(int rootContentId, IEnumerable<ContentNodeKit> kits)
Parameters
Type |
Name |
Description |
System.Int32 |
rootContentId |
|
IEnumerable<ContentNodeKit> |
kits |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
SetLocked(ContentNodeKit)
Declaration
public bool SetLocked(ContentNodeKit kit)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
UpdateContentTypesLocked(IEnumerable<IPublishedContentType>)
Sets data for updated content types
Declaration
public void UpdateContentTypesLocked(IEnumerable<IPublishedContentType> types)
Parameters
Type |
Name |
Description |
IEnumerable<IPublishedContentType> |
types |
|
View Source
UpdateContentTypesLocked(Nullable<IReadOnlyCollection<Int32>>, IReadOnlyCollection<IPublishedContentType>, IReadOnlyCollection<ContentNodeKit>)
Updates/sets/removes data for content types
Declaration
public void UpdateContentTypesLocked(IReadOnlyCollection<int>? removedIds, IReadOnlyCollection<IPublishedContentType> refreshedTypes, IReadOnlyCollection<ContentNodeKit> kits)
Parameters
Type |
Name |
Description |
System.Nullable<IReadOnlyCollection<System.Int32>> |
removedIds |
|
IReadOnlyCollection<IPublishedContentType> |
refreshedTypes |
|
IReadOnlyCollection<ContentNodeKit> |
kits |
|
View Source
UpdateDataTypesLocked(IEnumerable<Int32>, Func<Int32, Nullable<IPublishedContentType>>)
Declaration
public void UpdateDataTypesLocked(IEnumerable<int> dataTypeIds, Func<int, IPublishedContentType?> getContentType)
Parameters
Type |
Name |
Description |
IEnumerable<System.Int32> |
dataTypeIds |
|
Func<System.Int32, System.Nullable<IPublishedContentType>> |
getContentType |
|