function CleanUp(MaxDays: Integer; DeleteFolder: Boolean = False): Integer;
Description
Reduce the size of the permanent disk cache by deleting older cached images. Specify the maximum age of cache files in days (since the cached image was last accessed) or set MaxDays to 0 to delete the entire cache content.
If DeleteFolder is true and the folder is empty, it will be removed.
Result is the number of cache images deleted.