Object constructor.
rcube_imap_cache
__construct
( $db, $imap, $userid, $skip_deleted)
-
$db
-
$imap
-
$userid
-
$skip_deleted
Saves the message in cache.
-
string
$mailbox: Folder name
-
rcube_message_header
$message: Message data
-
bool
$force: Skips message in-cache existance check
Sets the flag for specified message.
void
change_flag
(string $mailbox, array $uids, string $flag, [bool $enabled = false])
-
string
$mailbox: Folder name
-
array
$uids: Message UIDs or null to change flag of all messages in a folder
-
string
$flag: The name of the flag
-
bool
$enabled: Flag state
Clears the cache.
void
clear
([string $mailbox = null], [array $uids = null])
-
string
$mailbox: Folder name
-
array
$uids: Message UIDs, NULL removes all messages in a folder
Cleanup actions (on shutdown).
void
close
()
Delete cache entries older than TTL
void
expunge
(string $ttl)
-
string
$ttl: Lifetime of message cache entries
Return (sorted) messages index (UIDs).
If index doesn't exist or is invalid, will be updated.
array
get_index
(string $mailbox, [string $sort_field = null], [string $sort_order = null], [ $existing = false], bool $exiting)
-
string
$mailbox: Folder name
-
string
$sort_field: Sorting column
-
string
$sort_order: Sorting order (ASC|DESC)
-
bool
$exiting: Skip index initialization if it doesn't exist in DB
-
$existing
Returns message data.
rcube_message_header
get_message
(
string $mailbox,
int $uid, [
bool $update =
true], [
$cache =
true],
bool $no_cache)
-
string
$mailbox: Folder name
-
int
$uid: Message UID
-
bool
$update: If message doesn't exists in cache it will be fetched from IMAP server
-
bool
$no_cache: Enables internal cache usage
-
$cache
Returns list of messages (headers). See rcube_imap::fetch_headers().
array
get_messages
(string $mailbox, [array $msgs = array()])
-
string
$mailbox: Folder name
-
array
$msgs: Message UIDs
Return messages thread.
If threaded index doesn't exist or is invalid, will be updated.
array
get_thread
(string $mailbox, string $sort_field, string $sort_order)
-
string
$mailbox: Folder name
-
string
$sort_field: Sorting column
-
string
$sort_order: Sorting order (ASC|DESC)
Clears index cache.
void
remove_index
([string $mailbox = null], [bool $remove = false])
-
string
$mailbox: Folder name
-
bool
$remove: Enable to remove the DB row
Removes message(s) from cache.
void
remove_message
([string $mailbox = null], [array $uids = null])
-
string
$mailbox: Folder name
-
array
$uids: Message UIDs, NULL removes all messages
Clears thread cache.
void
remove_thread
([string $mailbox = null])
-
string
$mailbox: Folder name
Synchronizes the mailbox.
void
synchronize
(string $mailbox)
-
string
$mailbox: Folder name