Clear Cache script

Information and Tutorials on features in Mylar and how to use it
Post Reply
senorsmartypants
Posts: 86
Joined: Sun Sep 02, 2018 10:00 pm

Clear Cache script

Post by senorsmartypants »

I'm making a script to clear the mylar cache. I have mylar download directly, and CBRs can linger in my cache. I based the script on info from here
https://github.com/evilhero/mylar/issues/1768

Here's the script so far.

Code: Select all

#!/bin/sh
cd /config/cache
rm -rf *cb[rz] *torrent *nzb mylar_*
Is it safe to delete getcomics-*.html files as well? There's several months of these files in my cache.
My script is currently set to be called after post processing.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Clear Cache script

Post by evilhero »

You can safely delete the getcomics-*.html files yes - those will just get re-generated as need be.

I'm not sure where this got lost - but there's an undocumented option in the config.ini that will delete unnecessary cache files on each startup of Mylar.

The variable is called cleanup_cache - just set it to True and it will delete all nzb, torrent, zip, html files as well as remove any mylar_XXXXXX subdirectories within the cache directory.
Post Reply