Page MenuHomePhorge

D5187.1775338729.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5187.1775338729.diff

diff --git a/lib/kolab_sync_backend_folder.php b/lib/kolab_sync_backend_folder.php
--- a/lib/kolab_sync_backend_folder.php
+++ b/lib/kolab_sync_backend_folder.php
@@ -144,8 +144,12 @@
Syncroton_Data_Factory::CLASS_TASKS,
];
- // Reset imap cache so we work with up-to-date folders list
+ // Reset imap cache, metadata cache and the folder list cache so we work with up-to-date folders lists
rcube::get_instance()->get_storage()->clear_cache('mailboxes', true);
+ kolab_sync::storage()->reset();
+ foreach ($folder_classes as $class) {
+ Syncroton_Data_Factory::factory($class, $device, $timestamp)->clearCache();
+ }
// Retrieve all folders already sent to the client
$select = $this->db->query("SELECT * FROM `{$this->table_name}` WHERE `device_id` = ?", $device->id);
diff --git a/lib/kolab_sync_data.php b/lib/kolab_sync_data.php
--- a/lib/kolab_sync_data.php
+++ b/lib/kolab_sync_data.php
@@ -747,6 +747,14 @@
return $folders;
}
+ /**
+ * Clear the internal folder list cache
+ */
+ public function clearCache()
+ {
+ $this->folders = [];
+ }
+
/**
* List of all IMAP folders (or subtree)
*
diff --git a/lib/kolab_sync_storage.php b/lib/kolab_sync_storage.php
--- a/lib/kolab_sync_storage.php
+++ b/lib/kolab_sync_storage.php
@@ -124,6 +124,7 @@
public function reset()
{
$this->folders = [];
+ $this->folder_meta = null;
}
/**
@@ -265,7 +266,7 @@
{
if (!isset($this->folder_meta)) {
// get folders activesync config
- $folderdata = $this->storage->get_metadata("*", self::ASYNC_KEY);
+ $folderdata = $this->storage->get_metadata("*", self::ASYNC_KEY, [], true);
if (!is_array($folderdata)) {
return $this->folder_meta = false;

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 9:38 PM (19 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831283
Default Alt Text
D5187.1775338729.diff (1 KB)

Event Timeline