[Python] Accessing Azure Cache for Redis database using all keys vs hardcoding key

Discussão em 'Python' iniciado por Stack, Abril 17, 2025.

  1. Stack

    Stack Membro Participativo

    I have a Azure redis cache and sometimes I need to get all values stored, to do that I use simple iteration like that:

    keys = db.keys()
    for key in keys:
    entry=db.get(key)


    Unfortunately, the results are different if I read some of the values directly

    db.get('my_key')


    Why that could be the case? Additionally, when I read from redis using redis insights - I get the same result as in the hardcoded scenario.

    Continue reading...

Compartilhe esta Página