fix invalidates media url's

This commit is contained in:
Maksim Pechnikov 2020-06-14 21:02:57 +03:00
commit 2e8a236cef
16 changed files with 346 additions and 114 deletions

View file

@ -13,7 +13,7 @@ CACHE_DIRECTORY="/tmp/pleroma-media-cache"
## $3 - (optional) the number of parallel processes to run for grep.
get_cache_files() {
local max_parallel=${3-16}
find $2 -maxdepth 2 -type d | xargs -P $max_parallel -n 1 grep -E Rl "^KEY:.*$1" | sort -u
find $2 -maxdepth 2 -type d | xargs -P $max_parallel -n 1 grep -E -Rl "^KEY:.*$1" | sort -u
}
## Removes an item from the given cache zone.
@ -37,4 +37,4 @@ purge() {
}
purge $1
purge $@