3

This article explains the cache setting in Drupal 7.

I'm using Blockcache_alter to cache some blocks. It's not clear to me how long those blocks are cached.

6
+50

Nothing special here. It's the same as on your admin/config/development/performance page. Module Block Cache Alter just alters 'cache' key for block and does not interfere with the mechanism of caching in Drupal.

Example 1:
Minimum cache lifetime: none,
Cron: every day,
Block cache will be flushed every day or if someone flush cache manually.  
On node or comment submit: the whole block cache will be flushed.

In Example 1 the whole block and page cache will be flushed immediately on every new comment, node, vote submit because of Minimum cache lifetime: none. See where cache_clear_all() is called.

Example 2:
Minimum cache lifetime: 12 hours,
Cron: every 6 hours,
Block cache will be flushed every 12 hours or if someone flush cache manually. 
On node or comment submit: only block cache older than 12 hours will be flushed.

Block and page cache items which are older than 12 hours will be flushed immediately on every new comment, node, vote submit. See where cache_clear_all() is called.

Cron period is important because Drupal tries to flush caches on every cron run.

This behaviour can be changed with Cache Expiration module.

| improve this answer | |

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.