Skip to content

Commit

Permalink
add isOnMemory
Browse files Browse the repository at this point in the history
  • Loading branch information
notohiro committed Sep 20, 2016
1 parent c25971a commit 46ca506
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 46ca506

Please sign in to comment.