mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-03-11 17:47:47 -05:00
[core] Add Custom Cache Manager (#67)
This commit adds a custom cache manager "CustomCacheManager" which is used in the "CachedNetworkImage" widget. The custom cache manager is required, so that we can adjust the stale periode of cached images. By default the package used 30 days as stale periode, but for our use case 7 days should be enough and we can reduce the storage used by the app. Note: We also fixed the "run.sh" script to work with devices where the name contains a space.
This commit is contained in:
11
app/run.sh
11
app/run.sh
@@ -4,8 +4,8 @@ if [[ "$#" -lt 1 ]]; then
|
||||
echo "$(basename "$0") -- program to run the app
|
||||
|
||||
where:
|
||||
-e|--environment set the environment on which the app should be run, e.g. -e=local
|
||||
-d|--device set the device on which the app should be run, e.g. -d=chrome"
|
||||
-e|--environment set the environment on which the app should be run, e.g. -e=\"local\"
|
||||
-d|--device set the device on which the app should be run, e.g. -d=\"chrome\""
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -27,10 +27,13 @@ done
|
||||
|
||||
if [ -z "${environment}" ] || [ -z "${device}" ]; then
|
||||
echo "You have to provide an environment and a device"
|
||||
echo "Example: $0 -e=local -d=chrome"
|
||||
echo " Example: $0 -e=\"local\" -d=\"chrome\""
|
||||
echo " Provided: $0 -e=\"${environment}\" -d=\"${device}\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Run: $0 -e=\"${environment}\" -d=\"${device}\""
|
||||
|
||||
# Load the environment variables from the corresponding ".env" file in the
|
||||
# "supabase" directory.
|
||||
set -o allexport && source "../supabase/.env.${environment}" && set +o allexport
|
||||
@@ -52,4 +55,4 @@ if [ "${device}" == "chrome" ]; then
|
||||
fi
|
||||
|
||||
# Run the app on the provided device and environment.
|
||||
flutter run -d ${device} ${additional_flags} --dart-define SUPABASE_URL=${supabase_url} --dart-define SUPABASE_ANON_KEY=${FEEDDECK_SUPABASE_ANON_KEY} --dart-define SUPABASE_SITE_URL=${FEEDDECK_SUPABASE_SITE_URL} --dart-define GOOGLE_CLIENT_ID=${FEEDDECK_GOOGLE_CLIENT_ID}
|
||||
flutter run -d "${device}" ${additional_flags} --dart-define SUPABASE_URL=${supabase_url} --dart-define SUPABASE_ANON_KEY=${FEEDDECK_SUPABASE_ANON_KEY} --dart-define SUPABASE_SITE_URL=${FEEDDECK_SUPABASE_SITE_URL} --dart-define GOOGLE_CLIENT_ID=${FEEDDECK_GOOGLE_CLIENT_ID}
|
||||
|
||||
Reference in New Issue
Block a user