node_save call cache_clear_all as you can see on http://api.drupal.org/api/drupal/modules!node!node.module/function/node_... . The same append in D7 in node_form_submit.

If I set (with drupal core patched) my block to expire in a certain amount of time, how this will not be affected by the clear_cache_all? And the same question when we use the option to clear with certain action like node save (but only for a specific type).

Thanks

Comments

quotesbro’s picture

Version: 6.x-1.5 » 6.x-1.x-dev
Category: support » bug

I can confirm this behavior.
Apparently we should patch node.module in D6 and node_form_submit in D7?

bkosborne’s picture

I'm assuming that cache_clear_all is used because Drupal makes no assumptions about how/where that node's content is distributed throughout the website. If you have a block that pulls in that content, it would would be stale without clearing out the cache. Having content be "context" aware and know if it should flush itself is very difficult.

bkosborne’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

I'm closing this, since I don't think this is the responsibility of the module. The module still does what it says it should: allows you to change the caching behavior of blocks. This issue is for changing the behavior of a drupal core function, cache_clear_all.