def bump_cache_for_product(product, shop=None):
 if (not shop):
  from shuup.core.models import ShopProduct
  for sp in ShopProduct.objects.filter(product_id=product.id):
   bump_cache_for_shop_product(sp)
 else:
  shop_product = product.get_shop_instance(shop=shop, allow_cache=False)
  bump_cache_for_shop_product(shop_product)

def bump_cache_for_product ( product , shop = None ) : if ( not shop ) : from shuup . core . models import ShopProduct for sp in ShopProduct . objects . filter ( product_id = product . id ) : bump_cache_for_shop_product ( sp ) else : shop_product = product . get_shop_instance ( shop = shop , allow_cache = False ) bump_cache_for_shop_product ( shop_product )
bump cache for product in case shop is not given all the shop products for the product is bumped .