I have one java app and flask app the java app will send some value to the flask app that I need to save it in the cache so I am using flask-caching and I am having some default time out in the flask caching. The problem is once a key is deleted from the flask caching automatically based on the timeout I need to send the value to the java app which key is deleted. I am not sure how I how can know that a value is deleted automatically from cache do we have some call back a method in flask caching that will notify that value is deleted flask caching or suggest me what kind of caching I can use to solve this problem.
Thanks in advance.
If you are using Redis Cache as the backend. You can use Redis notifications.
Basically the 2 steps would be.
You could use a key prefix etc as well. So as to identify the notification of the key expiry in the Java app.
For implementation details, this answer Notification of key expiration in redis python will further help you.