[Tickets #12589] Re: Kolab_Storage: Ensure status($folder) is not cached
noreply at bugs.horde.org
noreply at bugs.horde.org
Wed Aug 21 18:16:42 UTC 2013
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/12589
------------------------------------------------------------------------------
Ticket | 12589
Updated By | Michael Slusarz <slusarz at horde.org>
Summary | Kolab_Storage: Ensure status($folder) is not cached
Queue | Horde Framework Packages
Version | Git master
Type | Bug
State | Feedback
Priority | 1. Low
Milestone |
Patch | 1
Owners | Jan Schneider
------------------------------------------------------------------------------
Michael Slusarz <slusarz at horde.org> (2013-08-21 12:16) wrote:
> Is that a safe thing to do for a long running script with just one
> selected folder?
> I think we need add the STATUS_FORCE_REFRESH flag in case
> "current_selected_folder == $mailbox_to_check".
No. This is the whole reason we are caching in the first place. We
might access the status of a single mailbox 5 times in 0.01 seconds in
a script. We should absolutely not be issuing 5 NOOP requests for
something like this.
I could see adding something like a global "Long-running script" flag
to the base IMAP object that would indicate that the object is being
used in a long-running script and STATUS_FORCE_REFRESH should be used
on every status() call. But most scripts (under a second) don't need
this. Issuing NOOPs is expensive and unnecessary.
More information about the bugs
mailing list