Ejemplo n.º 1
0
        thread.start()

    time.sleep(2)
    c.getDistances()
    time.sleep(7)
    json = '{"a": 123, "b": 75}'
    c.writeCache('dolphin', json)

    json = "{'a': 1729, 'b': 540}"
    c.writeCache('cow', json)

    json = "{'a': '-1^\\frac{1}{2}', 'b': 'e'}"
    c.writeCache('elephant', json)

    json = "{'a': 1, 'b': 'apple', 'c': 'triangle'}"
    c.writeCache('dog', json)

    json = "{'a': 1337}"
    c.writeCache('cat', json)

    dol = c.readCache('dolphin')
    print("Value of dolphin is ", dol)

    #should result in cow,do being removed in the cache we just read from, but dolphin from the others
    json = "{'a': 0101010101}"
    c.writeCache('tiger', json)

    #will result in getting elephant bumped out from the cache we read dolphin from, but cow from the others
    json = "{'one': 'Beware the ides of March.', 'two', 'A soothsayer bids you beware the ides of March.' }"
    c.writeCache('emu', json)