HiveMovieCacheService class
Hive-based movie cache service that replaces Drift database functionality.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cacheMoviesForCategory(
CacheCategory category, List< Movie> movies) → Future<void> - Cache movies for a specific category.
-
clearAllCache(
) → Future< void> - Clear all cached data.
-
clearCacheForCategory(
CacheCategory category) → Future< void> - Invalidate cache for a specific category.
-
dispose(
) → Future< void> - Close Hive boxes when service is disposed.
-
getCachedMoviesForCategory(
CacheCategory category) → Future< List< Movie> ?> - Get cached movies for a specific category.
-
getCacheMetadata(
CacheCategory category) → Future< Map< String, dynamic> ?> - Get cache metadata for a category.
-
getMoviesWithCacheInfo(
CacheCategory category) → Future< CacheResult< List< ?>Movie> > - Get movies with cache information.
-
getStaleMovies(
CacheCategory category) → Future< List< Movie> ?> - Get cached movies regardless of TTL (for stale cache fallback).
-
initialize(
) → Future< void> - Initialise the Hive service and open boxes.
-
isCacheValid(
CacheCategory category) → Future< bool> - Check if cache for a category is valid (not expired).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited