Clean up assets that are older than 4 days to reduce assets cache size

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2019-05-14 21:33:48 +02:00
parent 1ca4241374
commit 66b4c6564a
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Clean up cached files that are older than 1 week
find tmp/cache/assets/sprockets/ -type f -mtime +7 -execdir rm -- "{}" \;
# Clean up cached files that are older than 4 days
find tmp/cache/assets/sprockets/ -type f -mtime +4 -execdir rm -- "{}" \;
du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"