This caused the syncroton Ping command to miss new task folders.
Because the Ping command is long running we use:
rcube::get_instance()->get_storage()->clear_cache('mailboxes', true);
To clear the cache before listing the folders. However, this doesn't
clear the in-memory cache in kolab_storage.
We then ended up in the branch returning the folder list directly from
that outdate in-memory cache and thus missed the update.
Since we already cache the folder list it doesn't seem necessary to
cache it again.
To make sure we request the folder type if not in the cache, we now use
folder_type() which handles this.
I did not remove the metadata cache entirely because I'm not sure about
the performance implications, but it means we still potentially deal
with outdated metadata (but not for new folders, and at least not the
entire folderlist).