Hi Community,
I have built a prompt application with nest + langChain, It is throwing a warning saying:
“The default method for hashing keys is insecure and will be replaced in a future version, but hasn’t been replaced yet as to not break existing caches. It’s recommended that you use a more secure hashing algorithm to avoid cache poisoning“.
to resolve it have build a redisClient to replace default in memory caching and then used client.makeDefaultKeyEncoder(sha256); to create a secure hash key, as suggested in trouble shoot document ( Insecure Cache Algorithms | 🦜️🔗 Langchain ) and caching document ( How to cache chat model responses | 🦜️🔗 Langchain ).
here is my implementation:
and then passed it to the model.
I can see that the data is getting stored to redis and caching is working but the warning still remains.
can someone please help me a solution.
