0

Hi All Is it possible to disable caching cms pages in magento ? I need to disable cache on cms pages for some reason

4

1 に答える 1

1

EE には、キャッシュされるページが 3 種類あります。CMS ページ、カテゴリ、および製品。各エンティティは、タグの下のタグapp/code/Core/Enterprise/PageCache/etc.xml内で定義されます。cmsページには、この行があります<cache><requests><frontend>

<cms>enterprise_pagecache/processor_default</cms> 

これにより、cms ページのプロセッサが設定されます。
カスタム モジュールの 1 つを config.xml に追加して、このキャッシュを無効にする必要があります。

<frontend>
    ...<!-- other config settings here -->
    <cache>
        <requests>
            <cms></cms><!-- this should override the cms page cache processor to null -->
        </requests>
    </cache>
</fronend>

モジュールをモジュールに依存させEnterprise_PageCacheます。
私はこれをテストしていません。動作しない場合は、キャッシュ プロセッサをモデルの 1 つに設定し、クラスにを返す<cms>module/cache_processor</cms>メソッドを追加できます。allowCachefalse

于 2013-09-05T12:22:23.573 に答える