diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 6c2ae7a..a4e39df 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -70,7 +70,7 @@
 
 	def validate_max_discount(self):
 		if self.rate_or_discount == "Discount Percentage" and self.item_code:
-			max_discount = frappe.db.get_value("Item", self.item_code, "max_discount")
+			max_discount = frappe.get_cached_value("Item", self.item_code, "max_discount")
 			if max_discount and flt(self.discount_percentage) > flt(max_discount):
 				throw(_("Max discount allowed for item: {0} is {1}%").format(self.item_code, max_discount))
 
@@ -158,7 +158,7 @@
 
 	if not (args.item_group and args.brand):
 		try:
-			args.item_group, args.brand = frappe.db.get_value("Item", args.item_code, ["item_group", "brand"])
+			args.item_group, args.brand = frappe.get_cached_value("Item", args.item_code, ["item_group", "brand"])
 		except TypeError:
 			# invalid item_code
 			return item_details
@@ -284,7 +284,7 @@
 
 	# load variant of if not defined
 	if "variant_of" not in args:
-		args.variant_of = frappe.db.get_value("Item", args.item_code, "variant_of")
+		args.variant_of = frappe.get_cached_value("Item", args.item_code, "variant_of")
 
 	if args.variant_of:
 		item_variant_condition = ' or item_code=%(variant_of)s '
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 19c86d5..2a17d80 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -161,7 +161,7 @@
 			self.update_project()
 		update_linked_invoice(self.doctype, self.name, self.inter_company_invoice_reference)
 
-		# create the loyalty point ledger entry if the customer is enrolled in any loyalty program 
+		# create the loyalty point ledger entry if the customer is enrolled in any loyalty program
 		if not self.is_return and self.loyalty_program:
 			self.make_loyalty_point_entry()
 		elif self.is_return and self.return_against and self.loyalty_program:
@@ -491,7 +491,7 @@
 		super(SalesInvoice, self).validate_warehouse()
 
 		for d in self.get_item_list():
-			if not d.warehouse and frappe.db.get_value("Item", d.item_code, "is_stock_item"):
+			if not d.warehouse and frappe.get_cached_value("Item", d.item_code, "is_stock_item"):
 				frappe.throw(_("Warehouse required for stock Item {0}").format(d.item_code))
 
 	def validate_delivery_note(self):
@@ -1006,7 +1006,7 @@
 			where redeem_against=%s''', (lp_entry.name), as_dict=1)
 		if against_lp_entry:
 			invoice_list = ", ".join([d.sales_invoice for d in against_lp_entry])
-			frappe.throw(_('''Sales Invoice can't be cancelled since the Loyalty Points earned has been redeemed. 
+			frappe.throw(_('''Sales Invoice can't be cancelled since the Loyalty Points earned has been redeemed.
 				First cancel the Sales Invoice No {0}''').format(invoice_list))
 		else:
 			frappe.db.sql('''delete from `tabLoyalty Point Entry` where sales_invoice=%s''', (self.name))
diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py
index 024dd62..04fa8dc 100644
--- a/erpnext/assets/doctype/asset/asset.py
+++ b/erpnext/assets/doctype/asset/asset.py
@@ -44,7 +44,7 @@
 		self.db_set('booked_fixed_asset', 0)
 
 	def validate_item(self):
-		item = frappe.db.get_value("Item", self.item_code,
+		item = frappe.get_cached_value("Item", self.item_code,
 			["is_fixed_asset", "is_stock_item", "disabled"], as_dict=1)
 		if not item:
 			frappe.throw(_("Item {0} does not exist").format(self.item_code))
@@ -61,7 +61,7 @@
 
 	def set_missing_values(self):
 		if not self.asset_category:
-			self.asset_category = frappe.db.get_value("Item", self.item_code, "asset_category")
+			self.asset_category = frappe.get_cached_value("Item", self.item_code, "asset_category")
 
 		if self.item_code and not self.get('finance_books'):
 			finance_books = get_item_details(self.item_code, self.asset_category)
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index b63c256..a543c20 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -134,7 +134,7 @@
 					d.last_purchase_rate = d.rate
 				else:
 
-					item_last_purchase_rate = frappe.db.get_value("Item", d.item_code, "last_purchase_rate")
+					item_last_purchase_rate = frappe.get_cached_value("Item", d.item_code, "last_purchase_rate")
 					if item_last_purchase_rate:
 						d.base_price_list_rate = d.base_rate = d.price_list_rate \
 							= d.rate = d.last_purchase_rate = item_last_purchase_rate
@@ -168,7 +168,7 @@
 		for d in self.get("items"):
 			if (not po_item_rows or d.name in po_item_rows) \
 				and [d.item_code, d.warehouse] not in item_wh_list \
-				and frappe.db.get_value("Item", d.item_code, "is_stock_item") \
+				and frappe.get_cached_value("Item", d.item_code, "is_stock_item") \
 				and d.warehouse and not d.delivered_by_supplier:
 					item_wh_list.append([d.item_code, d.warehouse])
 		for item_code, warehouse in item_wh_list:
@@ -286,7 +286,7 @@
 			if d.rm_item_code:
 				stock_bin = get_bin(d.rm_item_code, d.reserve_warehouse)
 				stock_bin.update_reserved_qty_for_sub_contracting()
-	
+
 	def update_receiving_percentage(self):
 		total_qty, received_qty = 0.0, 0.0
 		for item in self.items:
@@ -304,7 +304,7 @@
 		last_purchase_rate = (last_purchase_details['base_rate'] * (flt(conversion_factor) or 1.0)) / conversion_rate
 		return last_purchase_rate
 	else:
-		item_last_purchase_rate = frappe.db.get_value("Item", item_code, "last_purchase_rate")
+		item_last_purchase_rate = frappe.get_cached_value("Item", item_code, "last_purchase_rate")
 		if item_last_purchase_rate:
 			return item_last_purchase_rate
 
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 052ea03..b9efe53 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -139,7 +139,7 @@
 
 	def validate_max_discount(self):
 		for d in self.get("items"):
-			discount = flt(frappe.db.get_value("Item", d.item_code, "max_discount"))
+			discount = flt(frappe.get_cached_value("Item", d.item_code, "max_discount"))
 
 			if discount and flt(d.discount_percentage) > discount:
 				frappe.throw(_("Maximum discount for Item {0} is {1}%").format(d.item_code, discount))
@@ -166,7 +166,7 @@
 			if not it.item_code:
 				continue
 
-			last_purchase_rate, is_stock_item = frappe.db.get_value("Item", it.item_code, ["last_purchase_rate", "is_stock_item"])
+			last_purchase_rate, is_stock_item = frappe.get_cached_value("Item", it.item_code, ["last_purchase_rate", "is_stock_item"])
 			last_purchase_rate_in_sales_uom = last_purchase_rate / (it.conversion_factor or 1)
 			if flt(it.base_rate) < flt(last_purchase_rate_in_sales_uom):
 				throw_message(it.item_name, last_purchase_rate_in_sales_uom, "last purchase rate")
@@ -283,7 +283,7 @@
 
 		sl_entries = []
 		for d in self.get_item_list():
-			if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 and flt(d.qty):
+			if frappe.get_cached_value("Item", d.item_code, "is_stock_item") == 1 and flt(d.qty):
 				if flt(d.conversion_factor)==0.0:
 					d.conversion_factor = get_conversion_factor(d.item_code, d.uom).get("conversion_factor") or 1.0
 				return_rate = 0
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index b860f7d..f69b59f 100755
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -116,7 +116,7 @@
 						d.delivery_date = self.delivery_date
 					if getdate(self.transaction_date) > getdate(d.delivery_date):
 						frappe.msgprint(_("Expected Delivery Date should be after Sales Order Date"),
-							indicator='orange', title=_('Warning'))		
+							indicator='orange', title=_('Warning'))
 				if getdate(self.delivery_date) != getdate(max_delivery_date):
 					self.delivery_date = max_delivery_date
 			else:
@@ -136,7 +136,7 @@
 		super(SalesOrder, self).validate_warehouse()
 
 		for d in self.get("items"):
-			if (frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 or
+			if (frappe.get_cached_value("Item", d.item_code, "is_stock_item") == 1 or
 				(self.has_product_bundle(d.item_code) and self.product_bundle_has_stock_item(d.item_code))) \
 				and not d.warehouse and not cint(d.delivered_by_supplier):
 				frappe.throw(_("Delivery warehouse required for stock item {0}").format(d.item_code),
@@ -208,7 +208,7 @@
 	def check_credit_limit(self):
 		# if bypass credit limit check is set to true (1) at sales order level,
 		# then we need not to check credit limit and vise versa
-		if not cint(frappe.db.get_value("Customer", self.customer, "bypass_credit_limit_check_at_sales_order")):
+		if not cint(frappe.get_cached_value("Customer", self.customer, "bypass_credit_limit_check_at_sales_order")):
 			check_credit_limit(self.customer, self.company)
 
 	def check_nextdoc_docstatus(self):
@@ -281,7 +281,7 @@
 		item_wh_list = []
 		def _valid_for_reserve(item_code, warehouse):
 			if item_code and warehouse and [item_code, warehouse] not in item_wh_list \
-				and frappe.db.get_value("Item", item_code, "is_stock_item"):
+				and frappe.get_cached_value("Item", item_code, "is_stock_item"):
 					item_wh_list.append([item_code, warehouse])
 
 		for d in self.get("items"):
@@ -412,7 +412,7 @@
 					Item {0} is added with and without Ensure Delivery by \
 					Serial No.").format(item.item_code))
 				if item.item_code not in reserved_items:
-					if not frappe.db.get_value("Item", item.item_code, "has_serial_no"):
+					if not frappe.get_cached_value("Item", item.item_code, "has_serial_no"):
 						frappe.throw(_("Item {0} has no Serial No. Only serilialized items \
 						can have delivery based on Serial No").format(item.item_code))
 					if not frappe.db.exists("BOM", {"item": item.item_code, "is_active": 1}):
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index d3769a2..6ca3d5b 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -144,7 +144,7 @@
 
 	distinct_uoms = list(set([d.get(uom_field) for d in doc.get_all_children()]))
 	integer_uoms = filter(lambda uom: frappe.db.get_value("UOM", uom,
-		"must_be_whole_number") or None, distinct_uoms)
+		"must_be_whole_number", cache=True) or None, distinct_uoms)
 
 	if not integer_uoms:
 		return
