mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:26:02 -04:00
Define CACHE_SIZE_FACTOR once
This commit is contained in:
parent
47574c9cba
commit
b5e8d529e6
5 changed files with 6 additions and 21 deletions
|
@ -13,20 +13,16 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from synapse.util.caches import register_cache
|
||||
from synapse.util.caches import register_cache, CACHE_SIZE_FACTOR
|
||||
|
||||
|
||||
from blist import sorteddict
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CACHE_SIZE_FACTOR = float(os.environ.get("SYNAPSE_CACHE_FACTOR", 0.1))
|
||||
|
||||
|
||||
class StreamChangeCache(object):
|
||||
"""Keeps track of the stream positions of the latest change in a set of entities.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue