Skip to content

Commit

Permalink
Clean up some dogpile.cache regions
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Apr 26, 2021
1 parent 53e84c1 commit a86800e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion wetterdienst/provider/dwd/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def _create_file_index_for_dwd_server(
def reset_file_index_cache() -> None:
""" Function to reset the cached file index for all kinds of parameters """
fileindex_cache_five_minutes.invalidate()
fileindex_cache_one_hour.invalidate()


def build_path_to_parameter(
Expand Down
24 changes: 0 additions & 24 deletions wetterdienst/util/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ class CacheExpiry(Enum):
arguments={"filename": os.path.join(cache_dir, "dogpile", "fileindex_5m.dbm")},
)

fileindex_cache_one_hour = make_region(
function_key_generator=kwarg_function_key_generator
).configure(
backend,
expiration_time=60 * 60,
arguments={"filename": os.path.join(cache_dir, "dogpile", "fileindex_1h.dbm")},
)

fileindex_cache_twelve_hours = make_region(
function_key_generator=kwarg_function_key_generator
).configure(
Expand All @@ -98,22 +90,6 @@ class CacheExpiry(Enum):
arguments={"filename": os.path.join(cache_dir, "dogpile", "fileindex_12h.dbm")},
)

payload_cache_five_minutes = make_region(
function_key_generator=kwarg_function_key_generator
).configure(
backend,
expiration_time=60 * 5,
arguments={"filename": os.path.join(cache_dir, "dogpile", "payload_5m.dbm")},
)

payload_cache_one_hour = make_region(
function_key_generator=kwarg_function_key_generator
).configure(
backend,
expiration_time=60 * 60,
arguments={"filename": os.path.join(cache_dir, "dogpile", "payload_1h.dbm")},
)

payload_cache_twelve_hours = make_region(
function_key_generator=kwarg_function_key_generator
).configure(
Expand Down

0 comments on commit a86800e

Please sign in to comment.