legacy-knowledge-base
公開されました Sep. 10, 2025

CacheFilter 有効期限

written-by

Ankit Gupta

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

キャッシュフィルターは、処理されたウェブコンテンツをキャッシュするものです。 キャッシュの有効期限をライブに変更するには、ehcache.xmlを修正する必要があります。 では、有効期限はどこで設定すればいいのでしょうか。

環境

  • Liferay DXP 7.0

解像度

このプロパティで参照する ehcahce.xml は /liferay-single-vm.xml と / liferay-multi-vm-clustered.xml[Liferay_HomeosgimarketplaceLiferay Foundation.lpkgcom.liferay.portal.cache.ehcache-2.1.20.jar [] です。 liferay-multi-vm-clustered.xmlでは、キャッシュの有効期限を設定することができます。そのためには、 <defaultCache> タグ timeToLiveSeconds="time_in_sec"

timeToLiveSecondsのデフォルト値は「0」になっています。

追加情報

この点については、こちらの記事 ehcache link (Setting Expiration section)をご参照ください。

ただし、上記の方法は、DefaultCacheをベースにしたカスタムキャッシュの設定を行うことができず、Defaultcache自体を変更することができない場合にのみ実行するようにしてください。

did-this-article-resolve-your-issue

legacy-knowledge-base