diff --git a/deckhand/control/common.py b/deckhand/control/common.py index 09375e23..38a16834 100644 --- a/deckhand/control/common.py +++ b/deckhand/control/common.py @@ -16,6 +16,8 @@ import functools import falcon +from deckhand.engine import cache as engine_cache + class ViewBuilder(object): """Model API responses as dictionaries.""" @@ -119,3 +121,8 @@ def sanitize_params(allowed_params): return wrapper return decorator + + +def invalidate_cache_data(): + """Invalidate all data associated with document rendering.""" + engine_cache.invalidate() diff --git a/deckhand/control/revisions.py b/deckhand/control/revisions.py index 8b8e8242..c9f3d8df 100644 --- a/deckhand/control/revisions.py +++ b/deckhand/control/revisions.py @@ -87,7 +87,7 @@ class RevisionsResource(api_base.BaseResource): @policy.authorize('deckhand:delete_revisions') def on_delete(self, req, resp): - self._delete_all_barbican_secrets() - - db_api.revision_delete_all() + self._delete_all_barbican_secrets() # Delete all Barbican secrets. + db_api.revision_delete_all() # Delete all revisions. + common.invalidate_cache_data() # Invalidate all cached data. resp.status = falcon.HTTP_204