
from ._base import BaseSlavedStore
from synapse.storage.filtering import FilteringStore


class SlavedFilteringStore(BaseSlavedStore):
    def __init__(self, db_conn, hs):
        super(SlavedFilteringStore, self).__init__(db_conn, hs)

    get_user_filter = FilteringStore.__dict__["get_user_filter"]


from ._base import BaseSlavedStore
from synapse.storage.filtering import FilteringStore


class SlavedFilteringStore(BaseSlavedStore):
    def __init__(self, db_conn, hs):
        super(SlavedFilteringStore, self).__init__(db_conn, hs)

    # Filters are immutable so this cache doesn't need to be expired
    get_user_filter = FilteringStore.__dict__["get_user_filter"]

Add a comment explaining why the filter cache doesn't need exipiring
Add a comment explaining why the filter cache doesn't need exipiring

  
  from ._base import BaseSlavedStore
  from synapse.storage.filtering import FilteringStore
  
  
  class SlavedFilteringStore(BaseSlavedStore):
      def __init__(self, db_conn, hs):
          super(SlavedFilteringStore, self).__init__(db_conn, hs)
  
+     # Filters are immutable so this cache doesn't need to be expired
      get_user_filter = FilteringStore.__dict__["get_user_filter"]
  
Add a comment explaining why the filter cache doesn't need exipiring
## Code Before:

from ._base import BaseSlavedStore
from synapse.storage.filtering import FilteringStore


class SlavedFilteringStore(BaseSlavedStore):
    def __init__(self, db_conn, hs):
        super(SlavedFilteringStore, self).__init__(db_conn, hs)

    get_user_filter = FilteringStore.__dict__["get_user_filter"]

## Instruction:
Add a comment explaining why the filter cache doesn't need exipiring
## Code After:

from ._base import BaseSlavedStore
from synapse.storage.filtering import FilteringStore


class SlavedFilteringStore(BaseSlavedStore):
    def __init__(self, db_conn, hs):
        super(SlavedFilteringStore, self).__init__(db_conn, hs)

    # Filters are immutable so this cache doesn't need to be expired
    get_user_filter = FilteringStore.__dict__["get_user_filter"]
