Module ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore BinOpMult BinOpMult Num Num Num FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareGtE BinOpSub NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareGtE BinOpSub NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return Call AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A synapse.util.async ObservableDeferred SnapshotCache N/A object N/A N/A Cache for snapshots like the response of /initialSync.
    The response of initialSync only has to be a recent snapshot of the
    server state. It shouldn't matter to clients if it is a few minutes out
    of date.

    This caches a deferred response. Until the deferred completes it will be
    returned from the cache. This means that if the client retries the request
    while the response is still being computed, that original response will be
    used rather than trying to compute a new response.

    Once the deferred completes it will removed from the cache after 5 minutes.
    We delay removing it from the cache because a client retrying its request
    could race with us finishing computing the response.

    Rather than tracking precisely how long something has been in the cache we
    keep two generations of completed responses. Every 5 minutes discard the
    old generation, move the new generation to the old generation, and set the
    new generation to be empty. This means that a result will be in the cache
    somewhere between 5 and 10 minutes.
     N/A DURATION_MS N/A N/A 5 60 1000 __init__ N/A N/A self N/A N/A N/A N/A self pending_result_cache N/A N/A N/A self prev_result_cache N/A N/A N/A self next_result_cache N/A N/A N/A self time_last_rotated_ms 0 N/A rotate N/A N/A self time_now_ms N/A N/A N/A N/A N/A time_now_ms N/A self time_last_rotated_ms N/A self DURATION_MS N/A N/A N/A self prev_result_cache N/A self next_result_cache N/A N/A self next_result_cache N/A N/A N/A self time_last_rotated_ms N/A self DURATION_MS N/A N/A N/A time_now_ms N/A self time_last_rotated_ms N/A self DURATION_MS N/A N/A N/A self prev_result_cache N/A self next_result_cache N/A N/A self next_result_cache N/A N/A N/A self time_last_rotated_ms time_now_ms N/A get N/A N/A self time_now_ms key N/A N/A N/A N/A N/A self rotate time_now_ms N/A result N/A N/A N/A self prev_result_cache get key N/A result N/A N/A N/A self next_result_cache get key result N/A result N/A N/A N/A self pending_result_cache get key result N/A N/A result None N/A N/A N/A N/A result observe N/A N/A None N/A set N/A N/A self time_now_ms key deferred N/A N/A N/A N/A N/A self rotate time_now_ms N/A result N/A ObservableDeferred deferred N/A N/A N/A self pending_result_cache N/A key result shuffle_along N/A N/A r N/A N/A N/A N/A N/A self next_result_cache N/A key result N/A N/A N/A N/A self pending_result_cache pop key None N/A r N/A N/A N/A N/A result addBoth shuffle_along N/A N/A N/A result observe N/A N/A