The ObjectCache
class now has new method wait_for(entry_id)
which allows callers to be blocked until the corresponding cache entry becomes active. This is implemented using threading.Event
objects. The new method is used in the get_image
API method instead of a busy polling (with sleep). New configuration variable ENTRY_WAIT_TIMEOUT allows to configure timeout for maximum time spent waiting for entry activation.