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

Update to PINOperation 1.1.1 and fix warnings #213

Merged
merged 2 commits into from
Feb 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## master

* Add your own contributions to the next release on the line below this with your name.
- [fix] Fix up warnings and upgrade to PINOperation 1.1.1: [#213](https://github.com/pinterest/PINCache/pull/213)

## 3.0.1 -- Beta 6
- [fix] Add some sane limits to the disk cache: [#201]https://github.com/pinterest/PINCache/pull/201
Expand Down
4 changes: 2 additions & 2 deletions PINCache.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.frameworks = 'Foundation'
s.ios.weak_frameworks = 'UIKit'
s.osx.weak_frameworks = 'AppKit'
s.ios.deployment_target = '5.0'
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.8'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
Expand All @@ -22,7 +22,7 @@ EOS
s.prefix_header_contents = pch_PIN
s.subspec 'Core' do |sp|
sp.source_files = 'Source/*.{h,m}'
sp.dependency 'PINOperation', '~> 1.1.0'
sp.dependency 'PINOperation', '~> 1.1.1'
end
s.subspec 'Arc-exception-safe' do |sp|
sp.dependency 'PINCache/Core'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Add the following line to your `Cartfile` and run `carthage update --platform io

## Requirements

__PINCache__ requires iOS 5.0, tvOS 9.0, watchOS 2.0 or OS X 10.7 and greater.
__PINCache__ requires iOS 8.0, tvOS 9.0, watchOS 2.0 or OS X 10.8 and greater.

## Contact

Expand Down
16 changes: 8 additions & 8 deletions Source/PINCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ - (void)setObjectAsync:(id <NSCoding>)object forKey:(NSString *)key withCost:(NS
PINOperationGroup *group = [PINOperationGroup asyncOperationGroupWithQueue:_operationQueue];

[group addOperation:^{
[_memoryCache setObject:object forKey:key withCost:cost];
[self->_memoryCache setObject:object forKey:key withCost:cost];
}];
[group addOperation:^{
[_diskCache setObject:object forKey:key];
[self->_diskCache setObject:object forKey:key];
}];

if (block) {
Expand All @@ -165,10 +165,10 @@ - (void)removeObjectForKeyAsync:(NSString *)key completion:(PINCacheObjectBlock)
PINOperationGroup *group = [PINOperationGroup asyncOperationGroupWithQueue:_operationQueue];

[group addOperation:^{
[_memoryCache removeObjectForKey:key];
[self->_memoryCache removeObjectForKey:key];
}];
[group addOperation:^{
[_diskCache removeObjectForKey:key];
[self->_diskCache removeObjectForKey:key];
}];

if (block) {
Expand All @@ -185,10 +185,10 @@ - (void)removeAllObjectsAsync:(PINCacheBlock)block
PINOperationGroup *group = [PINOperationGroup asyncOperationGroupWithQueue:_operationQueue];

[group addOperation:^{
[_memoryCache removeAllObjects];
[self->_memoryCache removeAllObjects];
}];
[group addOperation:^{
[_diskCache removeAllObjects];
[self->_diskCache removeAllObjects];
}];

if (block) {
Expand All @@ -208,10 +208,10 @@ - (void)trimToDateAsync:(NSDate *)date completion:(PINCacheBlock)block
PINOperationGroup *group = [PINOperationGroup asyncOperationGroupWithQueue:_operationQueue];

[group addOperation:^{
[_memoryCache trimToDate:date];
[self->_memoryCache trimToDate:date];
}];
[group addOperation:^{
[_diskCache trimToDate:date];
[self->_diskCache trimToDate:date];
}];

if (block) {
Expand Down