更改appName等常量为全局变量

This commit is contained in:
rang 2025-11-14 16:34:42 +08:00
parent 896f8837bd
commit e2aa73c01c
35 changed files with 167 additions and 216 deletions

View file

@ -1,9 +1,9 @@
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:vaani/settings/constants.dart';
import 'package:vaani/globals.dart';
final imageCacheManager = CacheManager(
Config(
'${AppMetadata.appNameLowerCase}_image_cache',
'${appName}_image_cache',
stalePeriod: const Duration(days: 365 * 10),
repo: JsonCacheInfoRepository(),
maxNrOfCacheObjects: 1000,
@ -12,7 +12,7 @@ final imageCacheManager = CacheManager(
final apiResponseCacheManager = CacheManager(
Config(
'${AppMetadata.appNameLowerCase}_api_response_cache',
'${appName}_api_response_cache',
stalePeriod: const Duration(days: 7),
repo: JsonCacheInfoRepository(),
maxNrOfCacheObjects: 1000,