Commit 1f254aa7 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_trade: use shorter cache for resource list

erp5_ui_long is too long for user to use fast input for the following scenario:
1. user create purchase order
2. user use fast input to enter product with reference 324214(a missing product)
3. user type 324214 in fast input, it found nothing in Product or Service
4. then user create such product 324214
5. then user go back to purchase order and type again 324214
since previous result is still cached for one hour and user still can't find it.

in one hour, user is not available to add such product
parent a7fec1ef
...@@ -64,7 +64,7 @@ sql_kw['default_use_uid'] = [context.portal_categories.resolveCategory(use).getU ...@@ -64,7 +64,7 @@ sql_kw['default_use_uid'] = [context.portal_categories.resolveCategory(use).getU
getResourceItemList = CachingMethod(getResourceItemList, ("getResourceItemList", context.aq_parent.getId()), getResourceItemList = CachingMethod(getResourceItemList, ("getResourceItemList", context.aq_parent.getId()),
cache_factory="erp5_ui_long") cache_factory="erp5_ui_short")
return getResourceItemList(sql_kw) return getResourceItemList(sql_kw)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment