{ "id": "85920", "key": "TIMOB-7728", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-02-21T16:02:57.000+0000", "created": "2012-02-03T01:05:16.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "15332", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "85506", "key": "TIMOB-7605", "fields": { "summary": "iOS: httpClient file transfers appear to be cached in 1.8.0.1", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:24:38.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Since SDK 1.8, the ASIDownloadCache has been implemented in the TiNetworkHTTPClientProxy developer isn't able to enable/disable it at will.\r\n\r\nI use the XHR object to download a lot of files (hundreds, sometimes thousands) to enable photo album browsing offline, and when the app restarts, it hangs at the first xhr.open() method call because of ASIDownloadCache background task. The cache is absolutly useless for massive different files download, and developers should be able to decide whether they want to use it or not.\r\n\r\nSo I believe that :\r\n\r\n(In TiNetworkHTTPClientProxy.m) :\r\nrequest = [[ASIFormDataRequest requestWithURL:url] retain];\r\n[request setDownloadCache:[ASIDownloadCache sharedCache]];\r\n[request setDelegate:self];\r\n\r\nShould be something like this :\r\nrequest = [[ASIFormDataRequest requestWithURL:url] retain];\r\nif (useCache){\r\n[request setDownloadCache:[ASIDownloadCache sharedCache]];\r\n}\r\n[request setDelegate:self];\r\n\r\nI tried editing the SDK myself, adding the useCache parameter :\r\nTi.Network.createHTTPClient({\r\n timeout:5000,\r\n useCache:true\r\n});\r\n\r\nBut this won't work (it will disable the cache all the time, I'm not able to enable it back again).\r\n\r\nLink to my original Q&A post : http://developer.appcelerator.com/question/131438/application-hangs-at-startup-at-first-tinetwork-use-attempt\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: createHTTPClient shoud have a new parameter to enable/disable the cache.", "creator": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "181553", "author": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I was able to make the changes myself and I'm going to make a pull request to the official github repository.\r\n", "updateAuthor": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-03T02:08:26.000+0000", "updated": "2012-02-03T02:08:26.000+0000" }, { "id": "181554", "author": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request made.", "updateAuthor": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-03T03:13:36.000+0000", "updated": "2012-02-03T03:13:36.000+0000" }, { "id": "182244", "author": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "BTW, this issue should me moved to TIMOB. It seems I made a mistake when selecting where the issue should be...", "updateAuthor": { "name": "hmax", "key": "hmax", "displayName": "Henri-Maxime Ducoulombier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-07T11:56:52.000+0000", "updated": "2012-02-07T11:56:52.000+0000" }, { "id": "183875", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Dupe of TIMOB-7605", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-21T16:02:57.000+0000", "updated": "2012-02-21T16:02:57.000+0000" }, { "id": "414997", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as duplicate with regards to the information provided elsewhere in this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:24:38.000+0000", "updated": "2017-03-22T21:24:38.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }