Skip to content

Commit

Permalink
fix: invalidate BP cache on blueprint updates
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed Dec 16, 2024
1 parent 61fd855 commit 3d654ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/providers/blueprint_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def get_blueprint(self, type: str) -> Blueprint:
def invalidate_cache(self):
try:
logger.debug("invalidate cache")
self.prefetched_blueprints = {}
self.get_blueprint.cache_clear()
self.get_blueprint_with_extended_attributes.cache_clear()
except Exception as error:
Expand Down
2 changes: 1 addition & 1 deletion src/services/document_service/document_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_storage_recipes(self, type: str, context: str | None = None) -> list[Sto
return create_default_storage_recipe()

def invalidate_cache(self):
pass
self._blueprint_provider.invalidate_cache()

def save_blob_data(self, node: Node, repository: DataSource) -> dict:
"""
Expand Down

0 comments on commit 3d654ed

Please sign in to comment.