app/code/community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Abstract.php
protected function _getUrlTtls() {
        $str = array();
        $configTtls = Mage::helper('turpentine/data')->cleanExplode(PHP_EOL,
            Mage::getStoreConfig('turpentine_vcl/ttls/url_ttls'));
        $ttls = array();
        foreach ($configTtls as $line) {
            $ttls[] = explode(',', trim($line));
        }
        foreach ($ttls as $ttl) {
            $str[] = sprintf('if (bereq.url ~ "%s%s") { set beresp.ttl = %ds; }',
                $this->getBaseUrlPathRegex(), $ttl[0], $ttl[1]);
        }
        $str = implode(' else ', $str);
        if ($str) {
            $str .= sprintf(' else { set beresp.ttl = %ds; }',
                $this->_getDefaultTtl());
        } else {
            $str = sprintf('set beresp.ttl = %ds;', $this->_getDefaultTtl());
        }
        return $str;
    }
protected function _getUrlTtls() {
        $str = array();
        $configTtls = Mage::helper('turpentine/data')->cleanExplode(PHP_EOL,
            Mage::getStoreConfig('turpentine_vcl/ttls/url_ttls'));
        $ttls = array();
        foreach ($configTtls as $line) {
            $ttls[] = explode(',', trim($line));
        }
        foreach ($ttls as $ttl) {
            $str[] = sprintf('if (bereq.url ~ "%s%s") { set beresp.ttl = %ds; }',
                $this->getBaseUrlPathRegex(), $ttl[0], $ttl[1]);
        }
        $str = implode(' else ', $str);
        if ($str) {
            $str .= sprintf(' else { set beresp.ttl = %ds; }',
                $this->_getDefaultTtl());
        } else {
            $str = sprintf('set beresp.ttl = %ds;', $this->_getDefaultTtl());
        }
        return $str;
    }
protected function _getUrlTtls ( ) { $ str = array ( ) ; $ configTtls = Mage :: helper ( 'turpentine/data' ) -> cleanExplode ( PHP_EOL , Mage :: getStoreConfig ( 'turpentine_vcl/ttls/url_ttls' ) ) ; $ ttls = array ( ) ; foreach ( $ configTtls as $ line ) { $ ttls [ ] = explode ( ',' , trim ( $ line ) ) ; } foreach ( $ ttls as $ ttl ) { $ str [ ] = sprintf ( 'if (bereq.url ~ "%s%s") { set beresp.ttl = %ds; }' , $ this -> getBaseUrlPathRegex ( ) , $ ttl [ 0 ] , $ ttl [ 1 ] ) ; } $ str = implode ( ' else ' , $ str ) ; if ( $ str ) { $ str .= sprintf ( ' else { set beresp.ttl = %ds; }' , $ this -> _getDefaultTtl ( ) ) ; } else { $ str = sprintf ( 'set beresp.ttl = %ds;' , $ this -> _getDefaultTtl ( ) ) ; } return $ str ; }
Format the by-url TTL value list

@return string
Format the by - url TTL value list