Copy link to clipboard
Copied
Is there a feature, script, or plugin available that clears the cache upon opening/closing After Effects? I have to clear the cache lately at least once a day. Honestly, I'm clearning my cache more than I take out the trash.
I'd really like to just have it clear without needing to tell it. Is there something available that can help?
I guess you could add a one-line script like this to AE's Scripts/Startup and/or Scripts/Shutdown folders (haven't tried it though):
app.purge(PurgeTarget.ALL_CACHES);
Copy link to clipboard
Copied
I guess you could add a one-line script like this to AE's Scripts/Startup and/or Scripts/Shutdown folders (haven't tried it though):
app.purge(PurgeTarget.ALL_CACHES);
Copy link to clipboard
Copied
Have you tried using ChatGPT?
Here's what came back when I tried:
To clear the cache automatically when After Effects shuts down, you can create a script that runs when the application is closed. Here's an example script that you can use:
This script creates a function called clearCacheOnExit
that clears all caches using the app.purge(PurgeTarget.ALL_CACHES)
command, and then adds an event listener that runs the function when the application is closed using the app.addEventListener("afterClose", clearCacheOnExit)
command.
To use this script, save the script with a .jsx file extension. Then, move the script file to the "Scripts > ScriptUI Panels" folder in your After Effects installation directory.
When you launch After Effects, the script will automatically run when the application is closed, clearing the cache and helping to improve performance and prevent errors in your project.
Copy link to clipboard
Copied
Awesome, no I haven't tried using ChatGPT. Sounds like Mother from the movie, Alien.
Very comprehensive. Thanks guys! I'll give it a shot!
Copy link to clipboard
Copied
That's a very good example of the nonsense that ChatGTP produces, which looks convincing, but does not work. There is no method app.addEventListener in Adobe ExtendScript.
Copy link to clipboard
Copied
also, scripts which have no user interface should not be put in the ScriptUI Panels folder. And scripts which you put in the Script UI Panels folder are not launched when Ae starts - they are only launched when you execute the menu command which Ae creates for each script in the ScriptUI Panels folder.