updateOrInsert method

  1. @override
Future updateOrInsert(
  1. CacheObject cacheObject
)
override

Updates a given CacheObject, if it exists, or adds a new item to the repository

Implementation

@override
Future<dynamic> updateOrInsert(CacheObject cacheObject) {
  if (cacheObject.id == null) {
    return insert(cacheObject);
  } else {
    return update(cacheObject);
  }
}