Below is the code I have picked from hostsetting.aspx file (admin\host\hostsettings.ascx).. To set the cache time of your site you need to set the value with the cache name which will render in the host settings page under performance settings panel.
<asp:dropdownlist runat="server" Width="150">
<asp:listitem resourcekey="NoCaching" value="0">No Caching</asp:listitem>
<asp:listitem resourcekey="LightCaching" value="1">Light Caching</asp:listitem>
<asp:listitem resourcekey="ModerateCaching" value="3">Moderate aching</asp:listitem>
<asp:listitem resourcekey="HeavyCaching" value="6">Heavy Caching</asp:listitem>
</asp:dropdownlist>
The value in dropdown ranges from 0 to 6. The code above takes the value set in the dropdown and multiplies it by 20 to determine the cache duration.