Data Loader Plugin Reference#
DataSource Class#
This page serves as a reference for the Data Loader Plugins SDK, showing the various methods that need to be implemented on a data loader class.
See How To Write a Custom Data Loader Plugin for an introduction into how to create these classes.
Cache Class#
This class is used for cache and state handling as described in API for Caching and Custom State Management.
- class Cache#
Class which provides a common interface for all derived cache classes. The methods to be implemented throw an exception by default.
Provides an API like the built-in dictionary class.
- __init__()#
- __setitem__(key, value)#
Sets the value for the given key.
- __getitem__(key)#
Returns the value for the given key.
Raises a
KeyError
exception when the key does not exist.
- __delitem__(key)#
Deletes the value for the given key from the cache.
Raises a
KeyError
exception when the key does not exist.
- __contains__(key)#
Checks if the key exists. Returns True or False.
- get(key, default=None)#
Returns the value for the key if it’s in the cache. Returns the specified default value otherwise.
- clear(*args, **kwargs)#
Clears the cache by removing it’s entire content.