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:
parent
1ca4241374
commit
66b4c6564a
|
@ -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 %"
|
||||
|
|
Loading…
Reference in New Issue