Best Practices for Periodic Cleanup of Old Assets and Empty Folders in AEMaaCS
We are working on a periodic cleanup activity in AEM as a Cloud Service (AEMaaCS) to delete assets older than 180 days. As part of this process, we also need to programmatically delete root folders if they are empty after the assets are removed. On an average, we have more than 500 assets to be cleaned up. Some questions we need clarification on:
- What is the recommended approach to schedule this cleanup activity in AEMaaCS?
- Is the Asset API still recommended for this purpose, or is it considered deprecated? If so, what alternative APIs should we use?