DataSource.NET  7.1.5.312018
Caplin.DataSource.Cache.ICacheManager Interface Reference

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...
 

Detailed Description

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.

Member Function Documentation

void Caplin.DataSource.Cache.ICacheManager.DeleteCachedObject ( string  subject)

Deletes the cached values for the specified Caplin.DataSource.string.

Parameters
subjectThe 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

Parameters
subjectThe subject.
Returns
The Caplin.DataSource.Cache.Record.ICachedRecord for the specified Caplin.DataSource.string

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.

Parameters
subjectThe subject.
Returns
A message which represents the state of the Cache for the supplied Caplin.DataSource.string

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.

Parameters
subjectThe subject.
messageThe 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.


Generated on Sun Oct 21 2018 12:33:23 for DataSource.NET