Skip to content

Commit

Permalink
Add in memory matrix cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorkertesz committed Oct 8, 2024
1 parent 3c32d3e commit dae034e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/earthkit/regrid/utils/memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class NoPolicy(MemoryCachePolicy):
def check(self):
self.cache.max_mem = 0
self.cache.pre_check_matrix_size = False
self.ensure_capacity = False
self.cache.ensure_capacity = False

def reduce(self, *args, **kwargs):
self.cache._clear()
Expand All @@ -95,7 +95,7 @@ class UnlimitedPolicy(MemoryCachePolicy):
def check(self):
self.cache.max_mem = None
self.cache.pre_check_matrix_size = False
self.ensure_capacity = False
self.cache.ensure_capacity = False

def reduce(self, *args, **kwargs):
# must be called within a lock
Expand Down

0 comments on commit dae034e

Please sign in to comment.