Cache one large object and read from cache fast for flask Cache one large object and read from cache fast for flask flask flask

Cache one large object and read from cache fast for flask


Flask-Cache uses the Werkzeug cache, which uses the pickling library to serialize any cache values to a binary blob, so the value can be saved in any backend. Pickling and unpickling a 800MB object could take quite some time, especially if it's not just one big string or something "simple" like that.

At this point, i think it's better to write your own cache, tailored to the backend you use and the type of data you store.