Skip to content

Commit

Permalink
Merge pull request #87 from notohiro/master
Browse files Browse the repository at this point in the history
add isOnMemory function to check wether an object is currently cached in memory
  • Loading branch information
aschuch committed Sep 20, 2016
2 parents c25971a + 46ca506 commit 2328030
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AwesomeCache/Cache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ open class Cache<T: NSCoding> {
return objects
}

open func isOnMemory(forKey key: String) -> Bool {
return cache.object(forKey: key as NSString) != nil
}


// MARK: Set object

Expand Down

0 comments on commit 2328030

Please sign in to comment.