====== _construct ====== {#JAPI Joomla.Framework Cache JCache::__construct #} This is the class constructor. The constructor sets up the default group to use for function caching and builds the cache directory. ===== Syntax ===== void __construct ( **$options** ) | **$options** | array | is an associative array of options. | The following are the available options: * defaultGroup - the default cache group for function grouping. * cacheDir - the cache directory to be used. If not present, the Joomla! configuration cache path will be used. * automaticSerialization - specifies whether or not automatic serialization should be used. * fileNameProtection - specifies whether or notto use file name protection. * memoryCaching - specifies whether or not to use memory caching. * onlyMemoryCaching - specifies whether or not ONLY memory caching should be used. * memoryCachingLimit - the memory caching limit. * caching - specifies whether or not caching should be used. * lifeTime - the lifetime of objects in the cache. * fileLocking - specifies whether or not file locking should be used. * writeControl - specifies whether or not write control should be used. * readControl - specifies whether or not read control should be used. * readControlType - the type of read control to be used. * pearErrorMode - the pear error mode to be used.| Further information on the options array can be obtained from the [[http://pear.php.net/package/Cache_Lite/|Cache_Lite]] website. ===== Examples ===== Since this is an abstract class, the constructor is not called directly. The class is instantiated by calling the [[references:joomla.framework:jfactory-getCache|JFactory::getCache]] method. This method will instantiate the appropriate child class. This constructor is called by the child class using: parent::_construct( $options ); ~~DISCUSSION~~