ApexCleaner.cls : The main engine containing logic to query and delete records (e.g., old Debug Logs, stalled Flow Interviews, and expired Tasks).
: Uses metadata settings so admins can adjust cleaning rules without modifying code.
: Automatically deletes ApexLog records to prevent storage bloat.
: Identifies and removes Attachment or ContentDocument records that are no longer linked to active parent records.
Apex_Cleaner_Setting__mdt : A Custom Metadata Type to store retention periods (e.g., "Delete logs older than 30 days").
: Update the Apex_Cleaner_Setting__mdt records to define your data retention policy.