Skip to content

Commit

Permalink
Increase cache times
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodoering committed Oct 13, 2022
1 parent 990df57 commit 893aae6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:harpy/core/core.dart';
final homeTimelineProvider =
StateNotifierProvider.autoDispose<HomeTimelineNotifier, TimelineState>(
(ref) {
ref.cacheFor(const Duration(minutes: 5));
ref.cacheFor(const Duration(minutes: 15));

return HomeTimelineNotifier(
ref: ref,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:harpy/core/core.dart';
final likesTimelineProvider = StateNotifierProvider.autoDispose
.family<LikesTimelineNotifier, TimelineState, String>(
(ref, userId) {
ref.cacheFor(const Duration(minutes: 5));
ref.cacheFor(const Duration(minutes: 15));

return LikesTimelineNotifier(
ref: ref,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:harpy/core/core.dart';
final mediaTimelineProvider = Provider.autoDispose
.family<BuiltList<MediaTimelineEntry>, BuiltList<TweetData>>(
(ref, tweets) {
ref.cacheFor(const Duration(minutes: 5));
ref.cacheFor(const Duration(minutes: 15));

final mediaPreferences = ref.watch(mediaPreferencesProvider);
final connectivity = ref.watch(connectivityProvider);
Expand Down

0 comments on commit 893aae6

Please sign in to comment.