def get_paste(id):
    for doc in _cache:
        if int(doc["_id"]) == id:
            print("Fetching %d from cache..." % id)
            return doc
    return _db.get(str(id))
dataset/ETHPy150Open tamentis/vimpaste/vimpaste/db.py/get_paste/original