Home > Drupal > Clear Drupal Cache Manually

Clear Drupal Cache Manually

DRUPAL 7

If we want clear the cache by default, without admin user action. Normaly we use to clear the cache by admin/performance/.
This can be indirectly achieved for nodes as below,

function [module_name]_node_update($node){cache_clear_all(‘*’, ‘cache_views_data’, TRUE);
}

For Blocks,

While creating blocks for the module we can write as,

function [module_name]_block_info() {$blocks[‘product_filter’] = array(
‘info’ => t(‘Product Filter’),
‘cache’ => DRUPAL_NO_CACHE,
);

return $blocks;
}

Advertisements
Categories: Drupal
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: