[horde] IMP IMAP DB Cache backend lifetime
Joao S Veiga
jsveiga at rf.com.br
Mon Aug 28 13:35:32 UTC 2017
----- Message from Jan Schneider <jan at horde.org> ---------
>> 1 - horde-clear-cache does not clear the IMP IMAP DB cache tables
>> (horde_imap_client_data, horde_imap_client_metadata,
>> horde_imap_client_message). Is there a script for clearing these
>> tables, or doing it via sql is the only way?
>
> imp-query-imap-cache
>
>> 2 - the Db.php backend
>> (framework/Imap_Client/lib/Horde/Imap/Client/Cache/Backend/Db.php)
>> does have a clear($lifetime) function, but I couldn't find where is
>> it called. Who is supposed to call that?
>
> See above.
>
>> 3 - it seems there's a missing ")" in that function at the DELETE
>> statement (line 320 at
>> https://github.com/horde/horde/blob/master/framework/Imap_Client/lib/Horde/Imap/Client/Cache/Backend/Db.php):
>>
>> $purge = time() - $lifetime;
>> $sql = 'DELETE FROM %s WHERE messageid IN (SELECT messageid FROM %s
>> WHERE modified < ?';
>> foreach (array(self::MD_TABLE, self::MSG_TABLE) as $val) {
>>
>> I've searched for an sql error in the logs and couldn't find one
>> for this statement, so maybe it's never called?
>
> Indeed, fixed for the next release.
>
> It's only called when using the --lifetime parameter with
> imp-query-imap-cache.
>
Thank you Jan,
So if I understood correctly, the imap cache old entries are only
cleaned manually with the imp-query-imap-cache script, so there is no
automatic "expiring" like for the horde cache files?
Thanks again,
Joao
More information about the horde
mailing list