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) {
  return cacheObject.id == null ? insert(cacheObject) : update(cacheObject);
}