             reservoir.volume = unitVolume
             reservoir.date = date
             reservoir.pumpID = pumpID
+
+            let previousValue = self.recentReservoirObjectsCache?.first
 
             if self.recentReservoirObjectsCache != nil, let predicate = self.recentReservoirValuesPredicate {
                 self.recentReservoirObjectsCache = self.recentReservoirObjectsCache!.filter { predicate.evaluateWithObject($0) }

     - parameter unitVolume:        The reservoir volume, in units
     - parameter date:              The date of the volume reading
     - parameter completionHandler: A closure called after the value was saved. This closure takes two arguments:
        - value: The reservoir value, if it was saved
        - error: An error object explaining why the value could not be saved
     */
    public func addReservoirValue(unitVolume: Double, atDate date: NSDate, completionHandler: (value: ReservoirValue?, error: Error?) -> Void) {
        guard let pumpID = pumpID, persistenceController = persistenceController else {
            completionHandler(value: nil, error: .ConfigurationError)
            return
        }



            persistenceController.save { (error) -> Void in
                if let error = error {
                    completionHandler(value: reservoir, previousValue: previousValue, error: .PersistenceError(description: error.description, recoverySuggestion: error.recoverySuggestion))
                } else {
                    completionHandler(value: reservoir, previousValue: previousValue, error: nil)
                }

                NSNotificationCenter.defaultCenter().postNotificationName(self.dynamicType.ReservoirValuesDidChangeNotification, object: self)
