Skip to content

Commit

Permalink
Don't bust some of the cache values that we don't need to bust
Browse files Browse the repository at this point in the history
  • Loading branch information
Clark Perkins committed Oct 20, 2016
1 parent 1233f99 commit 7323b71
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions stackdio/api/stacks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,6 @@ def host_post_save(sender, **kwargs):
# Delete from the cache
cache_keys = [
'stack-{}-hosts'.format(host.stack_id),
'stack-{}-host-count'.format(host.stack_id),
'stack-{}-volume-count'.format(host.stack_id),
'stack-{}-health'.format(host.stack_id),
'host-{}-health'.format(host.id),
]
Expand Down Expand Up @@ -1472,17 +1470,6 @@ def host_post_delete(sender, **kwargs):
cache.delete_many(cache_keys)


@receiver(models.signals.post_save, sender=Stack)
def stack_post_save(sender, **kwargs):
stack = kwargs.pop('instance')

# Delete from the cache
cache_keys = [
'stack-{}-health'.format(stack.id),
]
cache.delete_many(cache_keys)


@receiver(models.signals.post_delete, sender=Stack)
def stack_post_delete(sender, **kwargs):
stack = kwargs.pop('instance')
Expand Down

0 comments on commit 7323b71

Please sign in to comment.