'Removes all cached image files and any attributes about the images'

def delete_all_cached_images(self):

    deleted = 0
    with self.get_db() as db:
        for path in self.get_cache_files(self.base_dir):
            delete_cached_file(path)
            deleted += 1
        db.execute('DELETE    FROM    cached_images')
        db.commit()
    return deleted
