'Return the number of hits that an image has.
:param image_id: Opaque image identifier'

def get_hit_count(self, image_id):

    if (not self.is_cached(image_id)):
        return 0
    hits = 0
    with self.get_db() as db:
        cur = db.execute('SELECT    hits    FROM    cached_images\n                                                                                                                    WHERE    image_id    =    ?', (image_id,))
        hits = cur.fetchone()[0]
    return hits
