Skip to content

Instantly share code, notes, and snippets.

@wongJonathan
Created April 17, 2017 19:20
Show Gist options
  • Save wongJonathan/7f283044e3c1722951c1bda95faae697 to your computer and use it in GitHub Desktop.
Save wongJonathan/7f283044e3c1722951c1bda95faae697 to your computer and use it in GitHub Desktop.
Reads n number of elasticache objects
import redis
import random
r = redis.StrictRedis(host='jwong-test-2-001.nkrcoi.0001.usw2.cache.amazonaws.com', port=6379, db=0)
n = 1000
for counter in range(0,n+1):
rand = random.randint(0,n)
print r.get('session_id_{0}'.format(rand))
print counter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment