By default Swift Performance generate global javascript files, which is good, because it will using less space, and also takes advantage of the browser caching.

However in some cases, scripts can contain dynamic parts (mostly inline scripts and script localization). This can cause issues, because Swift Performance will use the hash of the script file as a file name, and when scripts are regenerated but content is a bit different, it will produce a different hash – and a different file.

After a time your cache folder will be filled with abandoned javascript files, because Swift Performance can delete global script files only when all cache has been cleared.

You can exclude problematic scripts from merging, or alternatively you can use Separate Scripts feature.

If you enable this feature Swift Performance will generate separate scripts for all cached pages. It can increase a bit the cache size, however it won’t produce abandoned script files, so in long term cache size will be smaller.

If you see that your cache size is increasing day to day, you may should enable this feature, and click to Clear All Cache on Swift Performance Dashboard. Also check Separate Styles.