mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 20:49:24 -05:00
Cache filters
This commit is contained in:
parent
49c328a892
commit
8fe8951a8d
@ -16,12 +16,13 @@
|
|||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from ._base import SQLBaseStore
|
from ._base import SQLBaseStore
|
||||||
|
from synapse.util.caches.descriptors import cachedInlineCallbacks
|
||||||
|
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
|
|
||||||
|
|
||||||
class FilteringStore(SQLBaseStore):
|
class FilteringStore(SQLBaseStore):
|
||||||
@defer.inlineCallbacks
|
@cachedInlineCallbacks(num_args=2)
|
||||||
def get_user_filter(self, user_localpart, filter_id):
|
def get_user_filter(self, user_localpart, filter_id):
|
||||||
def_json = yield self._simple_select_one_onecol(
|
def_json = yield self._simple_select_one_onecol(
|
||||||
table="user_filters",
|
table="user_filters",
|
||||||
|
Loading…
Reference in New Issue
Block a user