Skip to content

Commit

Permalink
Merge pull request #342 from wikimedia/no_cache_default
Browse files Browse the repository at this point in the history
Switches default config to use no cache so pylru is not required.
  • Loading branch information
accraze committed Apr 28, 2020
2 parents fb4301e + 591eabd commit 6ba4499
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/00-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ores:
# Caching options
score_caches:
no_cache:
class: ores.score_caches.Empty
memory_lru:
class: ores.score_caches.LRU
size: 1024
Expand Down Expand Up @@ -55,7 +57,7 @@ metrics_collectors:
scoring_systems:
defaults:
metrics_collector: local_logging
score_cache: memory_lru
score_cache: no_cache
scoring_contexts:
- testwiki
timeout: 15 # seconds
Expand Down
4 changes: 4 additions & 0 deletions ores/score_caches/empty.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ def lookup(self, *args, **kwargs):

def store(self, *args, **kwargs):
return None

@classmethod
def from_config(cls, config, name, section_key="score_caches"):
return cls()

0 comments on commit 6ba4499

Please sign in to comment.