Skip to content

Commit 51c49f9

Browse files
committed
Add caching support to get_term_info_cached function with force refresh option
1 parent 1ddf8f6 commit 51c49f9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vfbquery/cached_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def is_valid_term_info_result(result):
8484
get_transgene_expression_here as _original_get_transgene_expression_here,
8585
)
8686

87-
def get_term_info_cached(short_form: str, preview: bool = False):
87+
@with_solr_cache('term_info')
88+
def get_term_info_cached(short_form: str, preview: bool = True, force_refresh: bool = False):
8889
"""
8990
Enhanced get_term_info with SOLR caching.
9091
@@ -93,6 +94,7 @@ def get_term_info_cached(short_form: str, preview: bool = False):
9394
Args:
9495
short_form: Term short form (e.g., 'FBbt_00003748')
9596
preview: Whether to include preview results
97+
force_refresh: Whether to bypass cache and fetch fresh data
9698
9799
Returns:
98100
Term info dictionary or None if not found

0 commit comments

Comments
 (0)