Gdn_Cache::option PHP Method

option() public method

The option keys are specific to the active cache type, but are always stored under $Configuration['Cache'][ActiveCacheName]['Option'][*].
public option ( $Option = null, $Default = null )
$Option The option key to retrieve
    public function option($Option = null, $Default = null)
    {
        static $ActiveOptions = null;
        if (is_null($ActiveOptions)) {
            $ActiveCacheShortName = ucfirst($this->activeCache());
            $OptionKey = "Cache.{$ActiveCacheShortName}.Option";
            $ActiveOptions = c($OptionKey, array());
        }
        if (is_null($Option)) {
            return $ActiveOptions;
        }
        return val($Option, $ActiveOptions, $Default);
    }