fix: Rebuild cache in background (#17487)
This commit is contained in:
parent
5cf12a4640
commit
14425575b7
@ -97,6 +97,10 @@ class ItemVariantsCacheManager:
|
||||
for key in keys:
|
||||
frappe.cache().hdel(key, self.item_code)
|
||||
|
||||
def rebuild_cache(self):
|
||||
self.clear_cache()
|
||||
enqueue_build_cache(self.item_code)
|
||||
|
||||
|
||||
def build_cache(item_code):
|
||||
frappe.cache().hset('item_cache_build_in_progress', item_code, 1)
|
||||
|
@ -964,7 +964,7 @@ def invalidate_item_variants_cache_for_website(doc):
|
||||
|
||||
if item_code:
|
||||
item_cache = ItemVariantsCacheManager(item_code)
|
||||
item_cache.clear_cache()
|
||||
item_cache.rebuild_cache()
|
||||
|
||||
|
||||
def check_stock_uom_with_bin(item, stock_uom):
|
||||
|
Loading…
x
Reference in New Issue
Block a user