         super.init();
     }
     
-    /// Add the model to the cache
-    public func addToCache() {
+    /// add a model to the cache
+    ///
+    /// - Returns: returns true if the model was added to the cache, false if it was already in the cache
+    public func addToCache() -> Bool {
         if self.isInCache == true {
-            return;
-        }
-        PSModelCache.shared.addModelToCache(model: self);
+            return false;
+        }
+        return PSModelCache.shared.addModelToCache(model: self);
     }
     
     

        }
        if inside == false {
            assertionFailure("You did not register the model type \(type.modelName)");
            return;
        }
        
        
        let name = type.modelName;
        if var cache = self.cache[name] {
            var foundIn: Bool = false;
            var foundIndex: Int = -1;
            for (i, m) in self.cache[name]!.enumerated() {
                if model.id == m.id {
                    foundIn = true;
                    foundIndex = i;
                }
            }
            if foundIn {
                self.cache[name]![foundIndex] = model;
            } else {
                cache.append(model);

    }
    
    
    
    /// add a model to the cache. It will find the proper cache based on the models type, append it and save the cache
    ///
    /// - Parameter model: the model to add
    /// - Returns: true if model was added to the cache, false if it was already in it
    public func addModelToCache(model: PSCachedModel) -> Bool {
        let type: PSCachedModel.Type = type(of: model);
        
        var inside: Bool = false;
