cache_translation¶
- astro_metadata_translator.cache_translation(func: Callable, method: str | None = None) Callable ¶
Cache the result of a translation method.
- Parameters:
- Returns:
- wrapped
Callable
Method wrapped by the caching function.
- wrapped
Notes
Especially useful when a translation uses many other translation methods or involves significant computation. Should be used only on
to_x()
methods.@cache_translation def to_detector_num(self): ....