         }
     }
 
-    func removeObjectForKey(key: String) {
+    public func removeObjectForKey(key: String) {
         if let cacheObject = realm.objectForPrimaryKey(CacheObject.self, key: key) {
             realm.write { [unowned self] in
                 self.realm.delete(cacheObject)

        return paths[0]
    }

    init(name: String = defaultCacheName) {
        self.name = name + ".realm"
        self.realm = Realm(path: RealmCache.cachesDirectory() + name)
    }

        realm.invalidate()
    }

    public func objectForKey(key: String) -> AnyObject? {
        if let cacheObject = realm.objectForPrimaryKey(CacheObject.self, key: key) {
            if expired(cacheObject) {
                removeObjectForKey(key)
