AnsweredAssumed Answered

AddToCache issue

Question asked by gouthamr388096 on Dec 5, 2017
Latest reply on Dec 6, 2017 by Srinivas Chandrakanth Vangari

Hi Guys

I have a question on AddToCache. I have a process where I am writing XML records to cache to retrieve later. The following is the sample of XML record. The index key I am using in the cache is id field shown in the XML below. So when I pass the id to the cache I want to retrieve the two quantity values shown below in bold and red color. However I am only getting first quantity and not getting the second one. Is Caching not best way to go here or what other technique should I be using?

 

sample XML.

<shipping_order_get_detail_response xmlns="urn:demandware.com:bf:api:core:v1">
<details>
<shipping_order_detail>
<id>SO1127</id>
<date>2017-11-16T08:36:41.94Z</date>
<shipping_order_items>
<shipping_order_item>
<attributes></attributes>
<invoice_item_guid>099f618f-aca9-4bf4-ae1a-a82d008deaae</invoice_item_guid>
<guid>8a80fa6e-191c-4e13-8167-a82d008dea6c</guid>
<line_id>2</line_id>
<quantity>10</quantity>
<quantity_ordered>10</quantity_ordered>
<shipping_order_currency_rate>1.000000000</shipping_order_currency_rate>
</shipping_order_item>
<shipping_order_item>
<attributes></attributes>
<invoice_item_guid>fc38cfa5-e573-4014-9a00-a82d008deaae</invoice_item_guid>
<guid>cc51762e-4b54-4363-8b78-a82d008dea6c</guid>
<line_id>1</line_id>
<quantity>1</quantity>
<quantity_ordered>1</quantity_ordered>
<shipping_order_currency_rate>1.000000000</shipping_order_currency_rate>
</shipping_order_item>
</shipping_order_items>
</shipping_order_detail>
</details>
</shipping_order_get_detail_response>

Thanks

goutham

Outcomes