You can use caching to mimic this behaviour in Flask, I.e.
http://flask.pocoo.org/docs/0.12/patterns/caching/
I'm not sure how this works with multiple threads though, I imagine you would have to synchronize it yourself.
http://flask.pocoo.org/docs/0.12/patterns/caching/
I'm not sure how this works with multiple threads though, I imagine you would have to synchronize it yourself.