VERSION
VERSION
Cache structure version.
A Horde_Cache implementation for caching IMAP/POP data.
Requires the Horde_Cache package.
__construct(array $params = array())
Constructor.
array | $params | Configuration parameters: - REQUIRED Parameters: - cacheob: (Horde_Cache) The cache object to use. - Optional Parameters: - lifetime: (integer) The lifetime of the cache data (in seconds). DEFAULT: 1 week (604800 seconds) - slicesize: (integer) The slicesize to use. DEFAULT: 50 |
get(string $mailbox, array $uids, array $fields, integer $uidvalid) : array
Get information from the cache for a set of UIDs.
string | $mailbox | An IMAP mailbox string. |
array | $uids | The list of message UIDs to retrieve information for. |
array | $fields | An array of fields to retrieve. If empty, returns all cached fields. |
integer | $uidvalid | The IMAP uidvalidity value of the mailbox. |
An array of arrays with the UID of the message as the key (if found) and the fields as values (will be undefined if not found).
set(string $mailbox, array $data, integer $uidvalid)
Store data in cache.
string | $mailbox | An IMAP mailbox string. |
array | $data | The list of data to save. The keys are the UIDs, the values are an array of information to save. |
integer | $uidvalid | The IMAP uidvalidity value of the mailbox. |
getMetaData(string $mailbox, integer $uidvalid, array $entries) : array
Get metadata information for a mailbox.
string | $mailbox | An IMAP mailbox string. |
integer | $uidvalid | The IMAP uidvalidity value of the mailbox. |
array | $entries | An array of entries to return. If empty, returns all metadata. |
The requested metadata. Requested entries that do not exist will be undefined. The following entries are defaults and always present:
setMetaData(string $mailbox, array $data)
Set metadata information for a mailbox.
string | $mailbox | An IMAP mailbox string. |
array | $data | The list of data to save. The keys are the metadata IDs, the values are the associated data. (If present, uidvalidity appears as the 'uidvalid' key in $data.) |
_loadSliceMap(string $mailbox, integer $uidvalid = null)
Load the slicemap for a given mailbox. The slicemap contains the uidvalidity information, the UIDs->slice lookup table, and any metadata that needs to be saved for the mailbox.
string | $mailbox | The mailbox. |
integer | $uidvalid | The IMAP uidvalidity value of the mailbox. |