Alternative path.inc handlers

18 Aug 2009
Posted by doq

Drupal 6.x core adds ability to change cache handler implementation by specifying another $conf['cache_inc'] in settings.php:

  1. case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
  2. // Allow specifying special cache handlers in settings.php, like
  3. // using memcached or files for storing cache information.
  4. require_once variable_get('cache_inc', './includes/cache.inc');

or specifying another $conf['session_inc'] session handler implementation:

  1. case DRUPAL_BOOTSTRAP_SESSION:
  2. require_once variable_get('session_inc', './includes/session.inc');

My idea was to add ability to change path.inc implementation by specifying $conf['path_inc'] setting in site's settings.php file.

This simple patch achieves this in your Drupal 6.x installation. After applying there will be no more need to patch core path.inc file. You will be able specify different path.inc implementation for different Drupal web-sites when multi-site feature is used.

For example, one web-site uses lots of path aliases and they should be cached in memcached server. Another one uses 10 path aliases so the implementation can be much more optimized to get them all at once from cache.

You can also find this patch in Drupal's Cache module package. You will also find several optimized path.inc implementations there.

AttachmentSize
path_inc-variable-support.patch965 bytes

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

 
 
 
If you have found mistakes in the text then please select it and press Ctrl-Enter to send report to the site administrator.