Délai d'attente du client Redis
-
27-10-2019 - |
Question
J'utilise ServiceStack RedisClient pour la mise en cache. Comment puis-je définir un délai? Par exemple, si le résultat est plus de 5 secondes à null retour? Tout le monde sait?
Merci
La solution
There are some operations like blocking LPOP/RPOP that includes a timeout.
In general redis runs in memory and is extremely fast so its rare that it timesout on its own. However the Network can be down so RedisNativeClient (the base class for RedisClient) includes a SendTimeout
which you can set to do this.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow