diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-11-13 11:56:22 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-11-13 11:56:22 +0000 |
commit | 8b33ac8f6c39b9debf89f1e96c72549cae29ae5f (patch) | |
tree | 7b48d39b17a82fa3751f5429b77bd5f7803aa40f /synapse/storage/state.py | |
parent | Fix 500 on invalid utf-8 in request (diff) | |
parent | Revert "move _state_group_cache to statestore" (diff) | |
download | synapse-8b33ac8f6c39b9debf89f1e96c72549cae29ae5f.tar.xz |
Merge branch 'develop' into rav/invalid_request_utf8
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index a1da3ad7a5..5673e4aa96 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -13,17 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -from collections import namedtuple -import logging +from ._base import SQLBaseStore +from synapse.util.caches.descriptors import cached, cachedList +from synapse.util.caches import intern_string +from synapse.util.stringutils import to_ascii +from synapse.storage.engines import PostgresEngine from twisted.internet import defer +from collections import namedtuple -from synapse.storage.engines import PostgresEngine -from synapse.util.caches import intern_string, CACHE_SIZE_FACTOR -from synapse.util.caches.descriptors import cached, cachedList -from synapse.util.caches.dictionary_cache import DictionaryCache -from synapse.util.stringutils import to_ascii -from ._base import SQLBaseStore +import logging logger = logging.getLogger(__name__) @@ -82,10 +81,6 @@ class StateStore(SQLBaseStore): where_clause="type='m.room.member'", ) - self._state_group_cache = DictionaryCache( - "*stateGroupCache*", 100000 * CACHE_SIZE_FACTOR - ) - @cached(max_entries=100000, iterable=True) def get_current_state_ids(self, room_id): """Get the current state event ids for a room based on the |