InMemoryIndexedCache Class

This contains a collection of XPath navigators indexed by member ID stored in a simple ConcurrentDictionaryTKey, TValue entirely in memory.

Definition

Namespace: Sandcastle.Tools.BuildComponents.Commands
Assembly: Sandcastle.Tools.BuildComponents (in Sandcastle.Tools.BuildComponents.dll) Version: 2024.12.21.0
public class InMemoryIndexedCache : IndexedCache
Inheritance
Object    IndexedCache    InMemoryIndexedCache

Remarks

This index maps the element keys to the files in which they are found. As needed, the files containing the requested keys are loaded and cached in memory. When the cache fills, the oldest file is unloaded to make room for a new file.

Constructors

Properties

Component This read-only property returns a reference to the CopyFromIndexComponent that owns it
(Inherited from IndexedCache)
Count This read-only property returns a count of the items in the indexed cache
(Overrides IndexedCacheCount)
IsDisposed This read-only property can be used to determine whether or not the indexed cache has been disposed
(Inherited from IndexedCache)
Item This read-only property returns the value in the indexed cache for the given key
(Overrides IndexedCacheItemString)
KeyExpression This read-only property returns the XPath expression used to extract the key from values
(Inherited from IndexedCache)
Name This read-only property returns the name of the index cache
(Inherited from IndexedCache)
ValueExpression This read-only property returns the XPath expression used to search for values in the XML files
(Inherited from IndexedCache)

Methods

AddDocuments This is used to index documents and add their key/file mappings to the cache
(Overrides IndexedCacheAddDocuments(XPathNavigator))
Dispose This implements the Dispose() interface to properly dispose of the indexed cache
(Inherited from IndexedCache)
Dispose(Boolean) This can be overridden by derived classes to add their own disposal code if necessary.
(Inherited from IndexedCache)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize This handles garbage collection to ensure proper disposal of the indexed cache if not done explicitly with Dispose.
(Inherited from IndexedCache)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetKeys This returns an enumerable list of all key values from the specified XML file based on the expressions for this cache.
(Inherited from IndexedCache)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValues This returns an enumerable list of all key/value pairs from the specified XML file based on the expressions for this cache.
(Inherited from IndexedCache)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ReportCacheStatistics Report the cache usage for the build
(Overrides IndexedCacheReportCacheStatistics)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also