DataSource.NET
7.1.6.312153
|
The ICacheManager interface provides access to the caching facilities provided by DataSource.NET. Access to the ICacheManager is obtained via the Caplin.DataSource.DataSource.CacheManager property. More...
Inherited by Caplin.DataSource.Cache.CacheManager.
Public Member Functions | |
void | DeleteCachedObject (string subject) |
Deletes the cached values for the specified Caplin.DataSource.string. More... | |
ICachedRecord | GetCachedRecord (string subject) |
Gets the cached record for the specified Caplin.DataSource.string More... | |
IMessage | GetImageMessage (string subject) |
Gets an image message for the specified subject. More... | |
void | UpdateCachedObject (string subject, IMessage message) |
Updates the cached object with the contents of the message. More... | |
The ICacheManager interface provides access to the caching facilities provided by DataSource.NET. Access to the ICacheManager is obtained via the Caplin.DataSource.DataSource.CacheManager property.
void Caplin.DataSource.Cache.ICacheManager.DeleteCachedObject | ( | string | subject | ) |
Deletes the cached values for the specified Caplin.DataSource.string.
subject | The subject. |
If the CachedPublisher is being used, then it will delete the cached item after the last peer has been discarded. However, should you be making use of the Cache functionality with any other publisher type then it is your responsibility to call this method and cleanup after the last peer has discarded the subject or the supplying backend system has deleted the object.
ICachedRecord Caplin.DataSource.Cache.ICacheManager.GetCachedRecord | ( | string | subject | ) |
Gets the cached record for the specified Caplin.DataSource.string
subject | The subject. |
Should an ICachedRecord not exist then a new ICachedRecordc> will be created for the specified subject.
IMessage Caplin.DataSource.Cache.ICacheManager.GetImageMessage | ( | string | subject | ) |
Gets an image message for the specified subject.
subject | The subject. |
The returned cached message may encapsulate multiple messages to reflect the state of the cache.
void Caplin.DataSource.Cache.ICacheManager.UpdateCachedObject | ( | string | subject, |
IMessage | message | ||
) |
Updates the cached object with the contents of the message.
subject | The subject. |
message | The message. |
This method will update the contents of the cache with the contents of the supplied IMessage. Should the IMessage not be of the same SubjectType as the cached object then no error will be reported.