📜 ⬆️ ⬇️

Drupal 6. Fast organization of simple caching.

I searched on Habré and did not find anything about using such a Drupal module as cacherouter . I correct this misunderstanding, because This module allows you to significantly speed up the work of Drupal even on such demanding hosting as Majordomo (likes to disable the entire account when the load is exceeded).

The module itself does not present anything new and cardinal - it only allows you to take cache tables from the database to other storages, such as the file system, memcache, APC, etc.

I, of course, have long been concerned about the question of what kind of ... the Drupal developers put the cache in the database, but the story is not about that.

')
So, what do we have in terms of cacherouter features?
If you go to the module page at the above link, then we get the following list of additional repositories:

In my projects, I used only caching to the file system, so I will only tell about it.

To launch the module, perform the following actions:
1. download and install the module in the standard way (I will not share this standard action);
2. in settings.php add the following settings:
$conf['cache_inc'] = './sites/all/modules/contrib/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => ' file ',
'servers' => array(),
'shared' => TRUE,
'prefix' => '',
'path' => 'sites/default/files/filecache',
'static' => FALSE,
'fast_cache' => TRUE,
),
);

change them according to your needs. In bold, I highlighted the changes to include the file cache in the standard settings from the module page.
3. create a directory to write cache files and give it the appropriate rights (you can simply 0777)

After that we go into the admin panel, turn on the cacherouter in the modules, then turn on caching in Settings, Performance, then delete the cache and enjoy life.

My projects after this began to issue pages almost instantly.

Source: https://habr.com/ru/post/90393/


All Articles