3

Hopefully, someone can help me?

I have Magento 1.9 and the database table core_cache keeps on getting bigger and bigger. Though I have setup my local.xml to use REDIS as the cache backend and also my sessions are setup to use files.

Is this normal? If so, why is cache being set in the DB when I am using Redis? Shouldn't it only be in Redis?

What can I do to stop it using the DB?

Also I use amasty full page cache.

  • 1
    have you configured this - amasty.com/docs/doku.php?id=magento_1:full_page_cache#fpc_redis – MagenX May 2 '18 at 7:35
  • Oh wow - thanks for letting me know about this! – loginid May 8 '18 at 5:38
  • @loginid When you are over the cache issue(s) and you are ready to make your MySQL instance be more responsive with less wait time, view myprofile, Network profile for contact information including my Skype ID. Looking forward to your contact. – Wilson Hauck Oct 12 '18 at 15:37
2

Amasty Full Page Cache uses its own Table called core_cache. This database will bloat as visitors visit the website. It is a big flaw with the software. Our database increased from 300Mb up to 8.5GB which resulted in slow database transactions (i.e. add to cart, login, etc), and we have a website with approx 1,000 products.

The table core_cache stores all the timestamps for cached files (in /var/cache)

This will empty when you manually empty the cache. (System > Cache Management > Empty Cache)

But will not empty with a cronjob.

You need to empty it daily manually, or via a handwritten script to truncate the table.

Having Spoken to the Amasty Tech Support, you have to install Redis and configure it so that Redis does all the caching!

Or if you are on web hosting with no Redis (i.e. 1&1) you need to keep truncating the database. There is no other solution around it.

1

If somebody does not have the possibility for use Redis you can clear core_cache table with the next code by cron:

/** @var Mage_Core_Model_Cache $model */
$model = Mage::getModel('core/cache');
/** @var Magento_Db_Adapter_Pdo_Mysql $connection */
$connection = $model->getDbAdapter();
$table = Mage::getSingleton('core/resource')->getTableName('core/cache');
$connection->truncateTable($table);
$connection->changeTableAutoIncrement($table, 1);

Also, we create a simple module which can be configured in Admin - System - Configuration - Core Cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.