Exemple #1
0
def memory_cache(event_loop):
    cache = SimpleMemoryCache(namespace="test")
    cache.set_policy(DefaultPolicy)
    yield cache

    event_loop.run_until_complete(cache.delete(pytest.KEY))
    event_loop.run_until_complete(cache.delete(pytest.KEY_1))
Exemple #2
0
def memory_cache(event_loop):
    cache = SimpleMemoryCache(namespace="test")
    yield cache

    event_loop.run_until_complete(cache.delete(pytest.KEY))
    event_loop.run_until_complete(cache.delete(pytest.KEY_1))
    event_loop.run_until_complete(cache.delete(pytest.KEY + '-lock'))
    event_loop.run_until_complete(cache.close())