Bases: object
Abstract class with methods which need to be implemented for custom manipulation.
Adding this as a base class for BaseTransform instead of adding import dependency of pymongo specific class i.e. pymongo.son_manipulator.SONManipulator and using that as base class. This is done to avoid pymongo dependency if MongoDB backend is not used.
Used while saving data to MongoDB.
Parameters: |
|
---|---|
Returns: | transformed SON object |
Bases: keystone.common.cache.backends.mongo.AbstractManipulator
Base transformation class to store and read dogpile cached data from MongoDB.
This is needed as dogpile internally stores data as a custom class i.e. dogpile.cache.api.CachedValue
Note: Custom manipulator needs to always override transform_incoming and transform_outgoing methods. MongoDB manipulator logic specifically checks that overriden method in instance and its super are different.
Bases: object
Class handling MongoDB specific functionality.
This class uses PyMongo APIs internally to create database connection with configured pool size, ensures unique index on key, does database authentication and ensure TTL collection index if configured so. This class also serves as handle to cache collection for dogpile cache APIs.
In a single deployment, multiple cache configuration can be defined. In that case of multiple cache collections usage, db client connection pool is shared when cache collections are within same database.
Bases: dogpile.cache.api.CacheBackend
A MongoDB based caching backend implementing dogpile backend APIs.
Arguments accepted in the arguments dictionary:
Parameters: |
|
---|
Following are optional parameters for MongoDB backend configuration,
Parameters: |
|
---|
Rest of arguments are passed to mongo calls for read, write and remove. So related options can be specified to pass to these operations.
Further details of various supported arguments can be referred from <http://api.mongodb.org/python/current/api/pymongo/>
Bases: dogpile.cache.api.CacheBackend
A no op backend as a default caching backend.
The no op backend is provided as the default caching backend for keystone to ensure that dogpile.cache.memory is not used in any real-world circumstances unintentionally. dogpile.cache.memory does not have a mechanism to cleanup it’s internal dict and therefore could cause run-away memory utilization.