Skip to content

Commit feb37f9

Browse files
authored
Merge pull request #324 from ImMin5/master
Fix yearly unified cost missing cache key error
2 parents ff65d64 + 505e89d commit feb37f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/spaceone/cost_analysis/manager/unified_cost_manager.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,12 @@ def analyze_yearly_unified_costs(self, query, target="SECONDARY_PREFERRED"):
7979
return self.unified_cost_model.analyze(**query)
8080

8181
@cache.cacheable(
82-
key="cost-analysis:analyze-unified-costs:yearly:{query_hash}", expire=3600 * 24
82+
key="cost-analysis:analyze-unified-costs:yearly:{domain_id}:{query_hash}",
83+
expire=3600 * 24,
8384
)
84-
def analyze_unified_yearly_costs_with_cache(self, query: dict) -> dict:
85+
def analyze_unified_yearly_costs_with_cache(
86+
self, query: dict, query_hash: str, domain_id: str
87+
) -> dict:
8588
return self.analyze_unified_costs(query)
8689

8790
@cache.cacheable(

0 commit comments

Comments
 (0)