Forces caching to be used or not.

void object->UseCache( bool use_cache )

Arguments

object
Required. A Chart object.
use_cache
Required. A boolean value specifying if caching should be used or not.

Remarks

Chart Caching is always used when the following methods are called to generate the chart: GetHTMLTag and GetOutputLocation. Therefore using UseCache before calling one of these methods has no effect.

However, you may want to use chart caching when generating charts through other methods.

This method overrides the Force Use Cache parameter value in the Swiff Chart Generator Control Panel as well as in the swfchart.ini configuration file


PHP Sample Code

The following PHP code illustrates use of the UseCache method.

// Create the chart series
$chart->SetDataFromQuery();
$chart->LoadStyle("C:\\myStyle.scs");

// Please use chart caching
$chart->UseCache(true);

// We can now generate the movie, using the cache. 
$chart->ExportAsResponse();

See Also

SetCacheName Method | SetPrivateCacheDir Method | SetMaxCacheSize Method | ClearCache Method

Applies To: Chart Object