<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Module / Xml / Controller
 */

namespace PH7;

use PH7\Framework\Mvc\Router\Uri;
use PH7\Framework\Xml\Exception as XmlException;
use PH7\Framework\Xml\Link;

class SitemapController extends MainController implements XmlControllable
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        $this->sTitle = t('Site Map');
        $this->view->page_title = $this->sTitle;
        $this->view->meta_description = t('Map of Website, Free Online Dating Site with Video Chat Rooms, Meet Single People with %site_name%');
        $this->view->h1_title = $this->sTitle;

        /*** Get the links ***/
        $sUrl = Uri::get('xml', 'sitemap', 'xmllink');

        try {
            $this->view->urls = (new Link($sUrl))->get();
        } catch (XmlException $oExcept) {
            $this->view->error = $oExcept->getMessage();
        }

        $this->output();
    }

    public function xmlLink()
    {
        parent::xmlLink();

        $this->view->display('links.xml.tpl');
    }
<commit_msg>Don't cache sitemap index page since it causes issues when user logged in<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Module / Xml / Controller
 */

namespace PH7;

use PH7\Framework\Mvc\Router\Uri;
use PH7\Framework\Xml\Exception as XmlException;
use PH7\Framework\Xml\Link;

class SitemapController extends MainController implements XmlControllable
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        $this->view->setCaching(true);

        $this->sTitle = t('Site Map');
        $this->view->page_title = $this->sTitle;
        $this->view->meta_description = t('Map of Website, Free Online Dating Site with Video Chat Rooms, Meet Single People with %site_name%');
        $this->view->h1_title = $this->sTitle;

        /*** Get the links ***/
        $sUrl = Uri::get('xml', 'sitemap', 'xmllink');

        try {
            $this->view->urls = (new Link($sUrl))->get();
        } catch (XmlException $oExcept) {
            $this->view->error = $oExcept->getMessage();
        }

        $this->output();
    }

    public function xmlLink()
    {
        parent::xmlLink();

        $this->view->display('links.xml.tpl');
    }

{'fraction_non_alphanumeric': 0.14765342960288808, 'fraction_numerical': 0.011552346570397111, 'mean_word_length': 2.5031605562579013, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4264530', 'n_tokens_mistral': 869, 'n_tokens_neox': 836, 'n_words': 213}