07-07-2017 01:29 AM
07-07-2017 01:34 AM
Alfresco Repository has a job that cleans temporary files that have been created using an Alfresco-specific API (TempFileProvider) for temporary files. This will affect only files in tomcat/temp/Alfresco. The job runs every 60 minutes and cleans all files that are 60 minutes or older. In the worst case, a temporary file may remain there for up to 119 minutes.
Other temporary files are not cleaned up by Alfresco.
07-07-2017 01:34 AM
Alfresco Repository has a job that cleans temporary files that have been created using an Alfresco-specific API (TempFileProvider) for temporary files. This will affect only files in tomcat/temp/Alfresco. The job runs every 60 minutes and cleans all files that are 60 minutes or older. In the worst case, a temporary file may remain there for up to 119 minutes.
Other temporary files are not cleaned up by Alfresco.
07-07-2017 01:42 AM
TempFileProvider also allows the creation of "long life folders" that are deleted by default after 24 hours
07-07-2017 01:51 AM
Can I configure this provider?
07-07-2017 02:20 AM
Yes,
TempFileProvider is part of alfresco-core (which is not a good name btw for utility classes), that has a inner class defining the Scheduled Job that handles temp files lifecycle. This Job is registered in scheduled-jobs-context.xml so you can override tempFileCleanerTrigger bean to configure it or even change the implementation if you need (sadly, long life folders are not handled by a cronExpression).
07-07-2017 02:24 AM
Yeay - answering at the same time. Though my answer starts with the opposite to "Yes", both responses cover the same aspects...
07-07-2017 02:31 AM
I guess you understood better the meaning of "Can I configure?"
12-22-2022 11:03 PM
yes, they are helping but not that much
07-07-2017 02:22 AM
No, the provider is a static utility without configuration. The only thing you can technically configure is the cleanup process, though there are no reasonable configuration properties you can set via alfresco-global.properties. You'd have to override the default Spring bean definition to change how often the job runs. The long life keep alive is hard-coded, and for the regular temporary file you can only configure the protectHours, e.g. you cannot go below 60 minutes.
Explore our Alfresco products with the links below. Use labels to filter content by product module.