From 61c1dfb57838127b66a7d7c3165bf0d266423363 Mon Sep 17 00:00:00 2001 From: Jason Dean Lessenich Date: Tue, 27 Feb 2024 15:07:17 +0100 Subject: [PATCH] Use cache as return value --- lib/src/entity_builder.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/entity_builder.dart b/lib/src/entity_builder.dart index f6431eb..275adb5 100644 --- a/lib/src/entity_builder.dart +++ b/lib/src/entity_builder.dart @@ -24,8 +24,7 @@ class EntityBuilder { createdAt: DateTime.parse(json['created_at']), isAdmin: json['is_admin'], ); - api.userCache.cache(user); - return user; + return api.userCache.cache(user); } Currency buildCurrency(Map json) { @@ -38,7 +37,6 @@ class EntityBuilder { decimalPlaces: json['decimal_places'], user: json['user'], ); - api.currencyCache.cache(currency); - return currency; + return api.currencyCache.cache(currency); } }