-
Notifications
You must be signed in to change notification settings - Fork 334
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
Automatically clear expired objects #294
base: master
Are you sure you want to change the base?
Conversation
Support expiry hyperoslo#294
it will be great if you add some description to the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the code with latest swift syntex
} | ||
|
||
public func applyExpiratonMode(_ expirationMode: ExpirationMode) { | ||
if let didEnterBackgroundObserver = didEnterBackgroundObserver { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let didEnterBackgroundObserver = didEnterBackgroundObserver { | |
if let didEnterBackgroundObserver { |
object: nil, | ||
queue: nil) | ||
{ [weak self] _ in | ||
guard let `self` = self else { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guard let `self` = self else { return } | |
guard let self else { return } |
|
||
public extension Storage { | ||
func applyExpiratonMode(_ expirationMode: ExpirationMode) { | ||
self.hybridStorage.applyExpiratonMode(expirationMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.hybridStorage.applyExpiratonMode(expirationMode) | |
hybridStorage.applyExpiratonMode(expirationMode) |
NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, | ||
object: nil, | ||
queue: nil) { [weak self] _ in | ||
guard let `self` = self else { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guard let `self` = self else { return } | |
guard let self else { return } |
No description provided.