Commit 3794c345 authored by Simon Cornet's avatar Simon Cornet
Browse files

feat: add cron for flushing disk cache

parent e2405d9a
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -9,5 +9,10 @@
# disable swap
@reboot swapoff -a

{% if type == 'vm' %}
# flush caches every 2 hours
0       */2     *       *       *       echo 3 > /proc/sys/vm/drop_caches
{% endif %}

# update packages between 3:15-3:30 am
15      3       *       *       *       sleep $(($RANDOM % 900)) && apk -U upgrade >/dev/null 2>&1 && apk clean cache && reboot -d 60