'Clears all items from the cache (whose age is the given amount of days or older).'

def clear(self, age=None):

    n = date_now()
    for p in glob.glob(os.path.join(self.path, '*')):
        if ((age is None) or ((n - date_modified(p)).days >= age)):
            os.unlink(p)
