# Magento Full Page Cache Expires in 2 hours

Is there any idea why Magento Enterprise Full Page Cache Expires in 2 hours ?

When does EE FPC expire? I found this link , but i dont know what exact code i need to put in local.xml. Is there any other settings that solves the Full page cache expire issue?

Thanks

• what cache backend do you use and how did you configure that full_page_cache node in local.xml? – FlorinelChis Dec 19 '13 at 17:17
• For Default Magento enterprise I changed it here: app/code/core/Mage/Core/Model/Cache.php: const DEFAULT_LIFETIME = 86400; The default was 7200 (2 hours) and its working fine for me – Pravin Feb 6 '14 at 12:54

It can depend on how your site/server was setup. That being said, in my app/etc/local.xml of a EE 1.13 site, using the built in Redis, I have the following:

<full_page_cache>
<backend>Mage_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server> <!-- or absolute path to unix socket -->
<port>6380</port>
<persistent></persistent> <!-- Specify a unique string like "cache-db0" to enable persistent connections. -->
<database>1</database> <!-- Separate database 1 to keep FPC separately -->
<force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
<connect_retries>1</connect_retries>    <!-- Reduces errors due to random connection failures -->
<compress_data>0</compress_data>        <!-- DISABLE compression for EE FPC since it already uses compression -->
</backend_options>
</full_page_cache>


Realistically, more information will need to be known because it will depend on what kind of server you have, who your host is (and whether it is a dedicated or shared box), what caching strategies are available on the server, etc.

We encountered server load spike every 2 hours due to clearing of cache. When it happened, it took a few minutes for the cache to repopulate and the load to settle down. As pointed out in the comment, the 2 hours constant is set at Mage_Core_Model_Cache::DEFAULT_LIFETIME. To change this to 24 hours, add this in app\etc\local.xml:

<global>
<cache>
<frontend_options>
</frontend_options>
</cache>
</global>