def __len__(self):
    """ Return the number of items in the cache. """
    row_count = 0
    with self.__connection:
      for post in (False, True):
        row_count += self.__connection.execute("SELECT COUNT(*) FROM %s;" % (self.getDbTableName(post=post))).fetchone()[0]
    return row_count
def __len__ ( self ) : row_count = 0 with self . __connection : for post in ( False , True ) : row_count += self . __connection . execute ( "SELECT COUNT(*) FROM %s;" % ( self . getDbTableName ( post = post ) ) ) . fetchone ( ) [ 0 ] return row_count
Return the number of items in the cache.