Skip to content

Commit

Permalink
Significantly larger network cache limits
Browse files Browse the repository at this point in the history
  • Loading branch information
ptsochantaris committed Sep 3, 2018
1 parent cdb0b18 commit 9e61ed3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions PocketTrailer Today Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.6.9</string>
<string>1.6.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1475</string>
<string>1476</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
Expand Down
4 changes: 2 additions & 2 deletions PocketTrailer WatchKit App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.9</string>
<string>1.6.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1475</string>
<string>1476</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
4 changes: 2 additions & 2 deletions PocketTrailer WatchKit Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.6.9</string>
<string>1.6.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1475</string>
<string>1476</string>
<key>CLKComplicationPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ComplicationDataSource</string>
<key>CLKComplicationSupportedFamilies</key>
Expand Down
4 changes: 2 additions & 2 deletions PocketTrailer/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.9</string>
<string>1.6.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -54,7 +54,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1475</string>
<string>1476</string>
<key>CoreSpotlightContinuation</key>
<true/>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
5 changes: 4 additions & 1 deletion Shared/API.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ final class API {

let config = URLSessionConfiguration.default
config.httpShouldUsePipelining = true
config.requestCachePolicy = .useProtocolCachePolicy
config.timeoutIntervalForRequest = 60
config.urlCache = URLCache(memoryCapacity: 32 * 1024 * 1024, diskCapacity: 1024 * 1024 * 1024, diskPath: cacheDirectory)
config.httpAdditionalHeaders = ["User-Agent" : userAgent]
return URLSession(configuration: config, delegate: nil, delegateQueue: sessionCallbackQueue)
}()
Expand Down Expand Up @@ -1596,7 +1599,7 @@ final class API {
let expandedPath = path.hasPrefix("/") ? S(server.apiPath).appending(pathComponent: path) : path
let url = URL(string: expandedPath)!

var request = URLRequest(url: url, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 60.0)
var request = URLRequest(url: url)
var acceptTypes = [String]()
if shouldSyncReactions {
acceptTypes.append("application/vnd.github.squirrel-girl-preview")
Expand Down
4 changes: 2 additions & 2 deletions Trailer/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.9</string>
<string>1.6.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1475</string>
<string>1476</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit 9e61ed3

Please sign in to comment.