In Drupal, if you need to clear cache from your module then you can add this code when you need to clear cache. Mostly when we create a custom FORM to add/edit/delete anything other than node, we may need to clear cache.
Code:
function MODULENAME_flush_cache(){ // this will clear any type of cache cache_clear_all(NULL, 'cache_block'); cache_clear_all(NULL, 'cache_page'); cache_clear_all('*', 'cache', TRUE); cache_clear_all('*', 'content', TRUE); cache_clear_all('*', 'cache_page', TRUE); cache_clear_all('*', 'cache_menu', TRUE); cache_clear_all('*', 'cache_filter', TRUE); }