Help us understand the problem. What is going on with this article?

EC-CUBE3 twig(テンプレートのキャッシュ制御)

More than 5 years have passed since last update.

現象

テンプレートを触って、リロードを行っても全く変更がされない。

原因

app/cache/twig
以下の twig のキャッシュファイルを全て削除すると、変更分が反映される。
どうも、キャッシュが優先されて、新しい変更分が反映されないらしい。

対応

twig の debug を true にすると、強制的にキャッシュを無効にできるらしい。

src/Eccube/Application.php 内の __construct() 内で、
debug の true, false の設定が行われているっぽい。

src/Eccube/Application.php
    public function __construct(array $values = array())
    {
        $app = $this;
        static::$app = $this;
        ini_set('error_reporting', E_ALL | ~E_STRICT);

        parent::__construct($values);

        // set env
        if (!isset($app['env']) || empty($app['env'])) {
            $app['env'] = 'prod';
        }
        if ($app['env'] === 'dev' || $app['env'] === 'test') {
            $app['debug'] = true;
        }

………

    }

EC-CUBE3のデバッグモードへの変更の仕方
ここに有りました。

設定ファイルで指定したい。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした