Hello Venkata Lakshmi Priyanka Gontla,
When "Run this script using the logged-on credentials" is used, the script runs under the current user context.
The behavior depends on how the script is configured to clear the cache and the kind of permissions the logged-on user has.
For example, if the script clears the cache for any/all users and it is set to run using logged-on credentials, then it might clear for all users if the logged-on user has permission. If the logged-on user doesn't have permission for other users' cache, it will clear only the cache of the current user only.
The best way to approach this is to create the script with the necessary conditions to check and clear the cache of logged in or standard users, and not admin accounts.
Hope that helps!
If you found the information above helpful, please Click Yes. This will assist others in the community who encounter a similar issue, enabling them to quickly find the solution and benefit from the guidance provided.