Provide mechanism to disable caching in Cronet iOS API |
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 Steps to reproduce the problem: This problem relates to the Cronet iOS API. I created an NSURLSessionConfiguration with URLCache = nil. According to the NSURLSessionConfiguration documentation, this should disable caching: https://developer.apple.com/reference/foundation/nsurlsessionconfiguration/1410148-urlcache?language=objc However, when I install the Cronet handler using this session configuration, Cronet still writes files to the Library/Caches/Cronet directory. What is the expected behavior? What went wrong? Cronet should respect the URLCache setting of NSURLSessionConfiguration. Or, if this is not technically feasible, there should be some other mechanism to disable caching on a per-session basis. (Or even a per-request basis, although this is a bit more awkward.) Did this work before? N/A Does this work in other browsers? N/A Chrome version: 55.0.2883.95 Channel: stable OS Version: OS X 10.12.2 Flash Version:
,
Jan 12 2017
An explicit API is fine with me. It would be good to document these sorts of gotchas somewhere since it may trip up other developers who just expect the existing session configuration to work identically with Cronet. Any idea when this API could be added?
,
Jan 12 2017
Adding this API should be reasonably straight forward, assigning to Lily to estimate.
,
Jan 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5ed6b50f4b3448acc783247123e02ed64ff8ba2a commit 5ed6b50f4b3448acc783247123e02ed64ff8ba2a Author: lilyhoughton <lilyhoughton@google.com> Date: Thu Jan 19 22:04:04 2017 Add configuration functions for HTTP cache type to Obj-C and C++ interfaces to Cronet. BUG= 680731 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2644583002 Cr-Commit-Position: refs/heads/master@{#444853} [modify] https://crrev.com/5ed6b50f4b3448acc783247123e02ed64ff8ba2a/components/cronet/ios/Cronet.h [modify] https://crrev.com/5ed6b50f4b3448acc783247123e02ed64ff8ba2a/components/cronet/ios/Cronet.mm [modify] https://crrev.com/5ed6b50f4b3448acc783247123e02ed64ff8ba2a/components/cronet/ios/cronet_environment.h [modify] https://crrev.com/5ed6b50f4b3448acc783247123e02ed64ff8ba2a/components/cronet/ios/cronet_environment.mm
,
Jan 30 2017
,
Jan 31 2017
We need to update this following an internal review: - Rename HttpCacheType enum into CRNHTTPCacheType. - Prefix HttpCacheType enum values with type name, e.g. CRNHTTPCacheTypeDisabled. - Use NS_ENUM to define HttpCacheType enum. See robgaunt for details.
,
Feb 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/289293b5aeb0d4eed997ec0fb2f5088b0db66d92 commit 289293b5aeb0d4eed997ec0fb2f5088b0db66d92 Author: lilyhoughton <lilyhoughton@google.com> Date: Thu Feb 02 19:15:51 2017 [Cronet] make HttpCacheType enum more comfortative to Obj-C style. Add 3-letter class prefix (CRN), prefix enum values with enum name, and use NS_ENUM macro. BUG= 680731 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2668353003 Cr-Commit-Position: refs/heads/master@{#447813} [modify] https://crrev.com/289293b5aeb0d4eed997ec0fb2f5088b0db66d92/components/cronet/ios/Cronet.h [modify] https://crrev.com/289293b5aeb0d4eed997ec0fb2f5088b0db66d92/components/cronet/ios/Cronet.mm [modify] https://crrev.com/289293b5aeb0d4eed997ec0fb2f5088b0db66d92/components/cronet/ios/cronet_environment.mm
,
Feb 14 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mef@chromium.org
, Jan 12 2017Components: -Blink>Internals Internals>Network>Library
Labels: -OS-Mac OS-iOS
Status: Available (was: Unconfirmed)