Skip to content

Commit

Permalink
change lru_cache to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff authored Nov 20, 2024
1 parent a5ef4c2 commit 613be2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions validphys2/src/validphys/commondataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"""

import dataclasses
from functools import cached_property, lru_cache
from functools import cached_property, cache
import logging
from operator import attrgetter
from pathlib import Path
Expand Down Expand Up @@ -819,13 +819,13 @@ def select_observable(self, obs_name_raw):
return observable


@lru_cache
@cache
def parse_set_metadata(metadata_file):
"""Read the metadata file"""
return parse_yaml_inp(metadata_file, SetMetaData)


@lru_cache
@cache
def parse_new_metadata(metadata_file, observable_name, variant=None):
"""Given a metadata file in the new format and the specific observable to be read
load and parse the metadata and select the observable. If any variants are selected, apply them.
Expand Down Expand Up @@ -949,7 +949,7 @@ def load_commondata_new(metadata):
###########################################


@lru_cache
@cache
def load_commondata(spec):
"""
Load the data corresponding to a CommonDataSpec object.
Expand Down

0 comments on commit 613be2b

Please sign in to comment.