Skip to content

Commit

Permalink
Merge branch 'main' into multi-store-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
JaffaKetchup authored Dec 9, 2024
2 parents 0aa119d + ea6686e commit 18b6d40
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Additionally, vector tiles are now supported in theory, as the internal caching/

* Brand new example app to (partially!) showcase the new levels of flexibility and customizability

## [9.1.4] - 2024/12/05

* Fixed bug in `removeTilesOlderThan` where actually tiles newer than the specified expiry were being removed ([#172](https://github.com/JaffaKetchup/flutter_map_tile_caching/issues/172))

## [9.1.3] - 2024/08/19

* Fixed bug where any operation that attempted to delete tiles fatally crashed on some iOS devices
Expand Down
1 change: 0 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: fmtc_example
description: The example application for 'flutter_map_tile_caching', showcasing
it's functionality and use-cases.
publish_to: "none"

version: 10.0.0

environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ Future<void> _worker(
.build();
final tilesQuery = (root.box<ObjectBoxTile>().query(
ObjectBoxTile_.lastModified
.greaterThan(expiry.millisecondsSinceEpoch),
.lessThan(expiry.millisecondsSinceEpoch),
)..linkMany(
ObjectBoxTile_.stores,
ObjectBoxStore_.name.equals(storeName),
Expand Down
10 changes: 9 additions & 1 deletion lib/src/backend/interfaces/backend/internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,15 @@ abstract interface class FMTCBackendInternal
});

/// {@template fmtc.backend.removeTilesOlderThan}
/// Remove tiles that were last modified after expiry from the specified store
/// Remove tiles that were last modified prior to the expiry timestamp from
/// the specified store
///
/// For example, to remove tiles last modified over 14 days ago, calculate
/// [expiry] with:
///
/// ```dart
/// expiry: DateTime.timestamp().subtract(const Duration(days: 14))
/// ```
///
/// Returns the number of tiles that were actually deleted (they were
/// orphaned). See [deleteTile] for more information about orphan tiles.
Expand Down

0 comments on commit 18b6d40

Please sign in to comment.