Amplify request definition duplication

56 views
Skip to first unread message

mandar katre

unread,
Apr 18, 2013, 12:58:39 AM4/18/13
to ampl...@googlegroups.com
Hi,

In my application, one request definition enables the cache and in other definition with same resourceId, the cache is not sent as a parameter which I guess will be resolved as undefined. The definition without cache parameter fires after the first definition, causing an overwrite. I wanted to know if this will cache the response or not. Also, is there an external way to set the cache property to true/false?

Doug Neiner

unread,
Apr 23, 2013, 2:48:36 PM4/23/13
to ampl...@googlegroups.com
Hey Mandar!

Sorry for the delay in response! 

Defining two requests with the same resourceId will cause the newer of the two to be overwritten with the second – it does cause the second to inherit from the first. The easiest way around this is to define two requests, one with the word cache in the resourceId so you know its the cached one.

Using the default AJAX request type, there is not a way to set the cache to true/false or a setting when you are making a request – it has to be done during the definition of the request.

Hopefully that helps you out! If you need more help, please provide some code examples of what you need to accomplish so we can provide more specific help.

Cheers,
Doug

On Wednesday, April 17, 2013 at 11:58 PM, mandar katre wrote:

Hi,

In my application, one request definition enables the cache and in other definition with same resourceId, the cache is not sent as a parameter which I guess will be resolved as undefined. The definition without cache parameter fires after the first definition, causing an overwrite. I wanted to know if this will cache the response or not. Also, is there an external way to set the cache property to true/false?

--
You received this message because you are subscribed to the Google Groups "Amplify" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amplifyjs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages