[Tickets #12510] Driver: $_count cache gets dirty on modifcations

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Jul 29 13:44:46 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12510
------------------------------------------------------------------------------
  Ticket             | 12510
  Created By         | Thomas Jarosch <thomas.jarosch at intra2net.com>
  Summary            | Driver: $_count cache gets dirty on modifcations
  Queue              | Turba
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Thomas Jarosch <thomas.jarosch at intra2net.com> (2013-07-29 13:44) wrote:

Hi,

while reading through the Turba driver code, I've noticed
there is an internal cache for the total count of contacts: $_count.

A generic count() implementation is in lib/Driver.php and a more specific
one for SQL in lib/Driver/Sql.php.

IMHO we should reset (=unset) the count cache in  
lib/Driver/Sql.php:_add(), _delete() and _deleteAll().
Is the owner allowed to change in _save()? Then _modify() would be  
affected, too.
Same goes for the generic count function.

Cheers,
Thomas






More information about the bugs mailing list