Usually, the security.caches are flushed out automatically when it reaches 80% mark - I would not recommend doing it manually/ via script.
1. Check if you have any network issues
2. Make sure that you do regular maintenance
Take a look at this:
Clarity performance
https://communities.ca.com/message/13391718
NJ