GridFS#

../../../_images/mongodb.png

GridFS is a specification for storing large files in MongoDB.

Use Cases#

Use this backend if you are using MongoDB and expect to store responses larger than 16MB. See mongodb for more general info.

Usage Example#

Initialize with a GridFSCache instance:

>>> from requests_cache import CachedSession, GridFSCache
>>> session = CachedSession(backend=GridFSCache())

Or by alias:

>>> session = CachedSession(backend='gridfs')