def get_ck_detail(refnum, cache_ttl=15):
    # Get the info on an CK object, with cache
    rk = 'detail.%s' % refnum
    d = memcache.get(rk)
    if d: return d

    d = CK_API.get_detail(refnum)
    memcache.add(rk, d, time=cache_ttl)

    return d
dataset/ETHPy150Open coinkite/coinkite-real-time-invoice/main.py/get_ck_detail/original