app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php
protected function _getDefaultEsiOptions($options) {
        $esiHelper = Mage::helper('turpentine/esi');
        $ttlParam = $esiHelper->getEsiTtlParam();
        $methodParam = $esiHelper->getEsiMethodParam();
        $cacheTypeParam = $esiHelper->getEsiCacheTypeParam();
        $defaults = array(
            $esiHelper->getEsiMethodParam()         => 'esi',
            $esiHelper->getEsiScopeParam()          => 'global',
            $esiHelper->getEsiCacheTypeParam()      => 'public',
            'dummy_blocks'      => array(),
            'registry_keys'     => array(),
        );
        $options = array_merge($defaults, $options);

        // set the default TTL
        if ( ! isset($options[$ttlParam])) {
            if ($options[$cacheTypeParam] == 'private' || $options[$cacheTypeParam] == 'customer_group') {
                switch ($options[$methodParam]) {
                    case 'ajax':
                        $options[$ttlParam] = '0';
                        break;

                    case 'esi':
                    default:
                        $options[$ttlParam] = $esiHelper->getDefaultEsiTtl();
                        break;
                }
            } else {
                $options[$ttlParam] = Mage::helper('turpentine/varnish')
                    ->getDefaultTtl();
            }
        }

        return $options;
    }
protected function _getDefaultEsiOptions($options) {
        $esiHelper = Mage::helper('turpentine/esi');
        $ttlParam = $esiHelper->getEsiTtlParam();
        $methodParam = $esiHelper->getEsiMethodParam();
        $cacheTypeParam = $esiHelper->getEsiCacheTypeParam();
        $defaults = array(
            $esiHelper->getEsiMethodParam()         => 'esi',
            $esiHelper->getEsiScopeParam()          => 'global',
            $esiHelper->getEsiCacheTypeParam()      => 'public',
            'dummy_blocks'      => array(),
            'registry_keys'     => array(),
        );
        $options = array_merge($defaults, $options);

        // set the default TTL
        if ( ! isset($options[$ttlParam])) {
            if ($options[$cacheTypeParam] == 'private' || $options[$cacheTypeParam] == 'customer_group') {
                switch ($options[$methodParam]) {
                    case 'ajax':
                        $options[$ttlParam] = '0';
                        break;

                    case 'esi':
                    default:
                        $options[$ttlParam] = $esiHelper->getDefaultEsiTtl();
                        break;
                }
            } else {
                $options[$ttlParam] = Mage::helper('turpentine/varnish')
                    ->getDefaultTtl();
            }
        }

        return $options;
    }
protected function _getDefaultEsiOptions ( $ options ) { $ esiHelper = Mage :: helper ( 'turpentine/esi' ) ; $ ttlParam = $ esiHelper -> getEsiTtlParam ( ) ; $ methodParam = $ esiHelper -> getEsiMethodParam ( ) ; $ cacheTypeParam = $ esiHelper -> getEsiCacheTypeParam ( ) ; $ defaults = array ( $ esiHelper -> getEsiMethodParam ( ) => 'esi' , $ esiHelper -> getEsiScopeParam ( ) => 'global' , $ esiHelper -> getEsiCacheTypeParam ( ) => 'public' , 'dummy_blocks' => array ( ) , 'registry_keys' => array ( ) , ) ; $ options = array_merge ( $ defaults , $ options ) ; // set the default TTL if ( ! isset ( $ options [ $ ttlParam ] ) ) { if ( $ options [ $ cacheTypeParam ] == 'private' || $ options [ $ cacheTypeParam ] == 'customer_group' ) { switch ( $ options [ $ methodParam ] ) { case 'ajax' : $ options [ $ ttlParam ] = '0' ; break ; case 'esi' : default : $ options [ $ ttlParam ] = $ esiHelper -> getDefaultEsiTtl ( ) ; break ; } } else { $ options [ $ ttlParam ] = Mage :: helper ( 'turpentine/varnish' ) -> getDefaultTtl ( ) ; } } return $ options ; }
Get the default ESI options

@return array
Get the default ESI options