def get_info(): """Returns a dictionary containing information about the Redis server""" cl = get_client() return cl.info()
def cleandb(): from ooredis import get_client cl = get_client() cl.flushdb()
def lastsave(): from ooredis import get_client cl = get_client() return cl.lastsave()
def get_all_keys(): from ooredis import get_client cl = get_client() return cl.keys()
def safe_exit(): from ooredis import get_client cl = get_client() cl.save() cl.shutdown()
def shutdown(): from ooredis import get_client cl = get_client() cl.shutdown()
def bgsave(): cl = get_client() cl.bgsave()
def save_db(): cl = get_client() cl.save()
def get_dbsize(): """Returns the number of keys in the current database""" cl = get_client() return cl.dbsize()