--- dblog/dblog.module	Fri Jul 25 14:40:42 2008
+++ dblog/dblog.module	Fri Jul 25 14:32:27 2008
@@ -44,50 +44,52 @@
 /**
  * Implementation of hook_menu().
  */
-function dblog_menu() {
-  $items[] = array(
-    'path' => 'admin/settings/logging/dblog',
-    'title' => t('Database logging'),
-    'description' => t('Settings for logging to the Drupal database logs. This is the most common method for small to medium sites on shared hosting. The logs are viewable from the admin pages.'),
-    'callback' => 'drupal_get_form',
-    'callback arguments' => array('dblog_admin_settings'),
-  );
+function dblog_menu($may_cache) {
+  if(!$may_cache){
+    if (arg(0) == 'admin' && arg(1) == 'logs') {
+      // Add the CSS for this module
+      drupal_add_css(drupal_get_path('module', 'dblog') .'/dblog.css', 'module', 'all', FALSE);
+    }
+  }
 
-  $items[] = array(
-    'path' => 'admin/logs/dblog',
-    'title' => t('Recent log entries'),
-    'description' => t('View events that have recently been logged.'),
-    'callback' => 'dblog_overview',
-    'weight' => -1,
-  );
-  $items[] = array(
-    'path' => 'admin/logs/page-not-found',
-    'title' => t("Top 'page not found' errors"),
-    'description' => t("View 'page not found' errors (404s)."),
-    'callback' => 'dblog_top',
-    'callback arguments' => array('page not found'),
-  );
-  $items[] = array(
-    'path' => 'admin/logs/access-denied',
-    'title' => t("Top 'access denied' errors"),
-    'description' => t("View 'access denied' errors (403s)."),
-    'callback' => 'dblog_top',
-    'callback arguments' => array('access denied'),
-  );
-  $items[] = array(
-    'path' => 'admin/logs/event',
-    'title' => t('Details'),
-    'callback' => 'dblog_event',
-    'callback arguments' => arg(3),
-    'type' => MENU_CALLBACK,
-  );
-  return $items;
-}
+  if($may_cache){
+    $items[] = array(
+      'path' => 'admin/settings/logging/dblog',
+      'title' => t('Database logging'),
+      'description' => t('Settings for logging to the Drupal database logs. This is the most common method for small to medium sites on shared hosting. The logs are viewable from the admin pages.'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('dblog_admin_settings'),
+    );
 
-function dblog_init() {
-  if (arg(0) == 'admin' && arg(1) == 'logs') {
-    // Add the CSS for this module
-    drupal_add_css(drupal_get_path('module', 'dblog') .'/dblog.css', 'module', 'all', FALSE);
+    $items[] = array(
+      'path' => 'admin/logs/dblog',
+      'title' => t('Recent log entries'),
+      'description' => t('View events that have recently been logged.'),
+      'callback' => 'dblog_overview',
+      'weight' => -1,
+    );
+    $items[] = array(
+      'path' => 'admin/logs/page-not-found',
+      'title' => t("Top 'page not found' errors"),
+      'description' => t("View 'page not found' errors (404s)."),
+      'callback' => 'dblog_top',
+      'callback arguments' => array('page not found'),
+    );
+    $items[] = array(
+      'path' => 'admin/logs/access-denied',
+      'title' => t("Top 'access denied' errors"),
+      'description' => t("View 'access denied' errors (403s)."),
+      'callback' => 'dblog_top',
+      'callback arguments' => array('access denied'),
+    );
+    $items[] = array(
+      'path' => 'admin/logs/event',
+      'title' => t('Details'),
+      'callback' => 'dblog_event',
+      'callback arguments' => arg(3),
+      'type' => MENU_CALLBACK,
+    );
+    return $items;
   }
 }
 
