From the category archives:

Drupal

If you’re having problems with Drupal cron — like cron runs are timing out or running out of memory — here’s a quick hack to figure out which module is causing the problems. Edit the includes/module.inc file, and find the function module_invoke_all.  Insert the line indicated below to have a notice added to the logs [...]

Or any other node attribute. Say you want to have a block that only shows up for “page” type nodes. Here’s how to do it…. In the configuration form for the block in question, use the following code in the “Page specific visibility settings” section. Be sure to select the “PHP” option. < ?php if [...]

Drupal caching

June 6, 2007 · 0 comments

in Drupal

A long overdue article on using Drupal’s database cache for module developers. He dissects three key functions: cache_set cache_get cache_clear_all And demos a function that uses this system. The end result? A slick little function that saves time whenever it can — first checking for an in-memory copy of the data, then checking the cache, [...]