Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25315] iOS: Allow cache-control to fsCachedData

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterVictor Vazquez Montero
AssigneeVijay Singh
Created2017-09-18T16:30:57.000+0000
Updated2018-10-03T11:06:39.000+0000

Description

Description

when cache-control is set to false fsCachedData is still storing http responses in iOS. Customer would like the ability to set cache-control to false and have parity between iOS and Android.

Additional information

Currently customer is using the following workaround for iOS to stop fsCachedData from storing HTTP responses var xhr = Ti.Network.createHTTPClient(); xhr.open('GET', 'http://www.customurl.com'); xhr.setRequestHeader('Cache-Control','no-cache'); xhr.setRequestHeader('Cache-Control','no-store'); xhr.send();

Comments

  1. Hans Knöchel 2017-09-18

    Please let me know what happens if you set xhr.setCache(false). This is how the cache-policy is set on iOS (specifically: In the NSURLRequest instance). If using the property does not help - and I would like you to test that first - I may know of a different approach to use from the SDK-side. Let me know! *EDIT*: And to flush the cache manually, they can use this quick Hyperloop snippet (please test before sending out):
       NSURLCache.sharedURLCache.removeAllCachedResponses();
       
  2. Victor Vazquez Montero 2017-10-09

    Hey [~hknoechel] no such luck. It doesn't do anything for fsCachedData.
  3. Victor Vazquez Montero 2017-10-25

    [~hknoechel] is there any timeline for this to be implemented?
  4. Victor Vazquez Montero 2018-01-08

    [~hknoechel] Hey is this still something being worked on?

JSON Source