mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 22:39:34 +00:00
更改appName等常量为全局变量
This commit is contained in:
parent
896f8837bd
commit
e2aa73c01c
35 changed files with 167 additions and 216 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue