Esempio n. 1
0
def rebuildProductPage(request=None, product_id=None):
  from apps.public.views.events import invalidate_product_cache
  try:
    invalidate_product_cache(product_id)
  except:
    messages.error(request,"Error refreshing cache on product page")
  return redirect('product', product_id)
Esempio n. 2
0
def resetProductPageCache(sender, instance, created, update_fields, **kwargs):
  from apps.public.views.events import invalidate_product_cache
  invalidate_product_cache(instance.id)