Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLCache sketches. Mainly memory cache. #2312

Closed
wants to merge 1 commit into from

Conversation

drodriguez
Copy link
Contributor

@millenomi: just in case you work more in URLCache. I was working on the memory cache, and I think I have a LRU memory cache and some sketches of other parts. It is not completely compatible with the code in #2000, but I think many parts of the code can be used (or at least the ideas contained in them).

I can also work on this if you prefer. I have some ideas on how to implement the disk cache (with flat files on disk). I was trying to get URLSession and the related classes in a less “unimplemented minefield” state. I also have some work done in the credential storage, if you want it.

@@ -129,6 +129,9 @@ open class CachedURLResponse : NSObject, NSSecureCoding, NSCopying {
open class URLCache : NSObject {

/*!
private static let _sharedCacheLock: NSLock = NSLock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was moving commits between branches. The documentation comment should go below the two private variables. I didn’t review the code before pushing, sorry about that.

}
}

/*!
private let _memoryCache: _URLMemoryCache<_URLCacheKey, CachedURLResponse>
private let _diskPath: String
private let _diskCache: _URLDiskCache<_URLCacheKey, CachedURLResponse>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also happens here. The variables should be outside the comment, not inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants