CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)
Pages: [1]

Author Topic: HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)  (Read 2715 times)

GregoryHeller

  • I post occasionally
  • **
  • Posts: 73
  • Karma: 3
HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)
June 08, 2007, 11:24:23 am
So we figured out a way to selectively turn drupal page caching off for civicrm
Put this in your settings.php:
Code: [Select]

$conf = array(

  'file_directory_path' => conf_path() .'/files', // not needed for this, but probably exists

  'page_cache_fastpath' => 1,

);

 

function page_cache_fastpath() {

  if (substr($_GET['q'], 7) == 'civicrm') {

    global $conf;

    $conf['cache'] = CACHE_DISABLED;

  }

}
« Last Edit: June 08, 2007, 05:45:54 pm by Donald Lobo »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
selectively setting drupal page caching
June 08, 2007, 01:20:13 pm
Gregory - This seems like really useful info for folks. Can you add this into the Install (for Drupal) documentation as an optional step (and explain a bit why they might want to do it).

http://wiki.civicrm.org/confluence/display/CRMDOC/Install+CiviCRM+1.7+for+Drupal
Protect your investment in CiviCRM by  becoming a Member!

GregoryHeller

  • I post occasionally
  • **
  • Posts: 73
  • Karma: 3
Re: HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)
June 20, 2007, 01:48:25 pm
see http://wiki.civicrm.org/confluence/display/CRMDOC/Install+CiviCRM+1.7+for+Drupal#InstallCiviCRM1.7forDrupal-%26nbsp%3BDrupalPageCachingOptionalConfiguration

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)
June 20, 2007, 03:35:36 pm
The doc addition looks great - thx!  :)
Protect your investment in CiviCRM by  becoming a Member!

dalin

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 8
  • CiviCRM version: many
  • CMS version: Drupal 6
  • MySQL version: 5.0
  • PHP version: 5.2
Re: HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)
June 27, 2007, 09:03:41 am
Whoops, there's a small mistake in your code gregory.  It should be:

  if (substr($_GET['q'], 0, 7) == 'civicrm') {

I'll update the wiki doc too.
--
Dave Hansen-Lange
Web Developer
Advomatic LLC
http://advomatic.com
Hong Kong office

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • HOWTO: How do i selectively disable Drupal Caching (in Drupal 5.x)

This forum was archived on 2017-11-26.