Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add a cache for initialSync responses that expires after 5 minutes #457

Merged
merged 4 commits into from
Dec 23, 2015

Conversation

NegativeMjark
Copy link
Contributor

Needs matrix-org/sytest#124 to land first

# missed most of the time. So we just lookup the key in all of the
# dictionaries rather than trying to short circuit the lookup if the
# key is found.
result = self.prev_result_cache.get(key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ITYM .get(key, None) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh nevermind... Though maybe put that as default anyway to not confuse the next person? ;)

NegativeMjark added a commit to matrix-org/sytest that referenced this pull request Dec 23, 2015
NegativeMjark added a commit to matrix-org/sytest that referenced this pull request Dec 23, 2015
Fix tests of /initialSync to work when the response is being cached

Work around the changes in matrix-org/synapse#457
@NegativeMjark NegativeMjark assigned richvdh and unassigned leonerd Dec 23, 2015
@richvdh
Copy link
Member

richvdh commented Dec 23, 2015

lgtm

NegativeMjark added a commit that referenced this pull request Dec 23, 2015
Add a cache for initialSync responses that expires after 5 minutes
@NegativeMjark NegativeMjark merged commit 8d6dde7 into develop Dec 23, 2015
@erikjohnston erikjohnston deleted the markjh/cached_sync branch January 12, 2016 16:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants