/[drupal]/contributions/modules/content_refresh/content_refresh.module
ViewVC logotype

Diff of /contributions/modules/content_refresh/content_refresh.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6, Wed Sep 10 20:53:57 2008 UTC revision 1.7, Wed Sep 10 21:06:52 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: content_refresh.module,v 1.5 2008/09/10 20:17:57 yaph Exp $  // $Id: content_refresh.module,v 1.6 2008/09/10 20:53:57 yaph Exp $
3    
4  /**  /**
5   * @file   * @file
6   * Author: Ramiro Gómez - http://www.ramiro.org   * Author: Ramiro Gómez - http://www.ramiro.org
7   * A Drupal module that provides cache clearing functionality for various content related actions.   * A Drupal module that provides cache clearing functionality
8     * for various content related actions.
9   */   */
10    
11  /**  /**
# Line 89  function content_refresh_clear_front_pag Line 90  function content_refresh_clear_front_pag
90    $front = variable_get('site_frontpage', 'node');    $front = variable_get('site_frontpage', 'node');
91    $url = url($front, array('absolute' => TRUE));    $url = url($front, array('absolute' => TRUE));
92    cache_clear_all($url, 'cache_page');    cache_clear_all($url, 'cache_page');
93    # clear pager pages    // clear pager pages
94    cache_clear_all($url . '?page', 'cache_page', TRUE);    cache_clear_all($url . '?page', 'cache_page', TRUE);
95    # clear cache entry for the front page entry without the site_frontpage value appended    // clear cache entry for the front page entry without the site_frontpage value appended
96    $url = preg_replace("%$front$%", '', $url);    $url = preg_replace("%$front$%", '', $url);
97    cache_clear_all($url, 'cache_page', FALSE);    cache_clear_all($url, 'cache_page', FALSE);
98  }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2