When using you2better the system will download the stream into cache files. The system has no option to specify the maximum size that that cache dir can have. I could either implement that on you2better, or create a new (small) script for this task. The advantage of creating it as a separate project is that I can use it elsewhere.
prunepath is a shell script that takes two arguments, DIR and SIZELIMIT. The first can be a relative path and must point to a directory. SIZELIMIT specifies a size threshold. The script will keep deleting files in the specified path until the size is below the threshold.
I’m using this with crond on the amuzi.me server to keep the cache size of you2better under control.