Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)
Specifies the cache name if caching is used.
Public Sub SetCacheName( cache_name As String )
public void SetCacheName( string cache_name );
If not defined in the Swiff Chart Generator Control Panel, the default cache name is "/charts_cache".
The cache name defines the location of the public cache on the web server.
The public cache directory stores the SWF, JPG, PNG, SVG and PDF files generated and returned by Swiff Chart Generator.
This directory is defined as follows: <web_server_root>/<cache_name>.
This method overrides the Cache Name parameter value in the Swiff Chart Generator Control Panel as well as in the swfchart.ini configuration file
Important: for security reasons, web users should not be allowed to list this directory (otherwise they would be able to display any chart created on your server). You should therefore disable directory listing or put a default index file in it.
If the web server root is "C:\Inetpub\wwwroot", calling SetCacheName("/swf_cache")
will set the public cache directory to "C:\Inetpub\wwwroot\swf_cache".
Cached files will then be written in this directory and their URL will be "/swf_cache/XXXXXXXX-XXXXXXXX.swf".
The following code illustrates use of the SetCacheName method.
' Create the chart series chart.SetDataFromTxtFile("C:\\myData.txt") chart.LoadStyle("C:\\myStyle.scs") ' Set a custom cache name chart.SetCacheName("/my_cache_name")
// Create the chart series chart.SetDataFromTxtFile("C:\\myData.txt"); chart.LoadStyle("C:\\myStyle.scs"); // Set a custom cache name chart.SetCacheName("/my_cache_name");
SetPrivateCacheDir Method | SetMaxCacheSize Method | ClearCache Method | UseCache Method
Applies To: Chart Object