CWIMAPCacheManager


Discussion

This class provides trivial extensions to the CWCacheManager superclass for CWIMAPFolder instances.

Superclass

CWCacheManager

Declared In

CWIMAPCacheManager.h



Methods

-initWithPath:folder:
-messageWithUID:
-readAllMessages
-readMessagesInRange:
-removeMessageWithUID:
-setUIDValidity:
-UIDValidity
-writeRecord:message:

initWithPath:folder:


- (id) initWithPath: (NSString *) thePath folder: (CWFolder *) theFolder; 

messageWithUID:


- (CWIMAPMessage *) messageWithUID: (unsigned int) theUID; 
Parameters
theUID

The UID of the message to obtain from the cache.

Return Value

The instance, nil if not present in the receiver's cache.

Discussion

This method is used to obtain the CWIMAPMessage instance from the receiver's cache.


readAllMessages


- (void) readAllMessages; 

readMessagesInRange:


- (void) readMessagesInRange: (NSRange) theRange; 

removeMessageWithUID:


- (void) removeMessageWithUID: (unsigned int) theUID; 
Parameters
theUID

The UID of the message to remove from the cache.

Discussion

This method is used to remove the associated message from the cache based on the supplied UID.


setUIDValidity:


- (void) setUIDValidity: (unsigned int) theUIDValidity; 
Parameters
theUIDValidity

The value to set.

Discussion

This method is used to set the UID validity value of the receiver's cache.


UIDValidity


- (unsigned int) UIDValidity; 
Return Value

The UID validity.

Discussion

This method is used to obtain the UID validity value of the receiver's cache. If it doesn't match the UID validity of its associated CWIMAPFolder instance, you should invalidate the cache.


writeRecord:message:


- (void) writeRecord: (cache_record *) theRecord message: (id) theMessage; 
Parameters
theRecord

The record to write.

theMessage

The message associated to the record theRecord.

Discussion

This method is used to write a cache record to disk.


Member Data

_folder
_table
_UIDValidity

_folder


private

CWFolder *_folder;

_table


private

NSMapTable *_table;

_UIDValidity


private

unsigned int _UIDValidity;