Hi Woodley,
For UI actions, you can always take a look at particular module and its controls. \CMS\CMSModules\System\Controls\System.ascx.cs is class you are looking for. Button action is called with a method that clears Cache on application first and even calls GC for cleanup:
protected void ClearCache(object sender = null, EventArgs args = null)
{
if (StopProcessing)
{
return;
}
// Clear the cache
CacheHelper.ClearCache(null, true);
Functions.ClearHashtables();
// Drop the routes
CMSDocumentRouteHelper.DropAllRoutes();
// Disposes all zip files
ZipStorageProvider.DisposeAll();
// Collect the memory
GC.Collect();
GC.WaitForPendingFinalizers();
// Log event
EventLogProvider.LogEvent(EventType.INFORMATION, "System", "CLEARCACHE", GetString("Administration-System.ClearCacheSuccess"));
ShowConfirmation(GetString("Administration-System.ClearCacheSuccess"));
LoadData();
}