SPServices caching with cacheXML:false on iOS‏

Oct 15, 2013 at 6:03 PM
Edited Oct 15, 2013 at 6:04 PM
I am trying to use a SharePoint list to get and update a list of devices our team has. When I run the application on my desktop, it works just fine without the results getting cached. However, when I run the app on my iPad and update the list, any future getList requests still return the old values. I verified on the SharePoint list and the values are getting updated. I also noticed in the SPS JS file there were some "cacheXML:true" lines so I turned them all to false. I even tried removing the spservices script and reloading it but to no avail. Here is the code I am using to make the get request:
  operation: "GetListItems",
  cacheXML: false,
  completefunc: function (xData, status){
     console.log('updated list: ' + xData.repsonseText);
     parseXML(xData.responseXML); //function I wrote to handle the XML returned
Edit: formatting
Oct 15, 2013 at 6:11 PM
It can be tricky to debug this sort of thing. I believe that SPServices is doing the right thing since you see the behavior you want on your desktop.

I've seen instances where something between the user device and SharePoint - like an over-zealously configured F5 - can cause things to be cached. In this case, it has nothing to do with SharePoint or SPServices.

The only recommendation I can give you is to make sure that the call to GetListItems does indeed happen when you expect it to on the iPad.

Oct 15, 2013 at 6:36 PM
I went ahead and made an XHR to the list when the SPService call is getting made. The XHR had the new values but the SPService call had the old ones still. I then changing the SPService call to just a normal soap call and I keep getting the old values, so I think it's the iPad doing the caching. Since updates still work flawlessly, I think I can just parse the HTML from the XHR to get the list information. It will be tedious, but I don't think there's more I can do on the soap front. Thanks.
Oct 15, 2013 at 7:07 PM
Edited Oct 15, 2013 at 7:07 PM
Well, I've got to say that I'm glad SPServices is working correctly.

I'm starting to play around with GetListItemSinceChanges and GetListItemChangesSinceToken for a series of blog posts I'm doing. https://spservices.codeplex.com/wikipage?title=Lists&referringTitle=%24%28%29.SPServices

They have been broken in all production releases of SPServices but should work in the current alpha if you'd like to try them out.