From 66b4c6564a8493182c8ed2761bb7a81129663e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 14 May 2019 21:33:48 +0200 Subject: Clean up assets that are older than 4 days to reduce assets cache size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- scripts/clean-old-cached-assets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/clean-old-cached-assets') diff --git a/scripts/clean-old-cached-assets b/scripts/clean-old-cached-assets index 7a3a62a477a..8bdd3a9cdb6 100755 --- a/scripts/clean-old-cached-assets +++ b/scripts/clean-old-cached-assets @@ -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 %" -- cgit v1.2.3