View source
<?php
function authcache_enable() {
global $user;
if (substr(variable_get('cache_inc', FALSE), -13) != 'authcache.inc') {
drupal_set_message(st('Your settings.php file must be modified to enable Authcache ($conf[\'cache_inc\']). See <a href="@url">README.txt</a>.', array(
'@url' => base_path() . drupal_get_path('module', 'authcache') . '/README.txt',
)), 'error');
}
drupal_set_message(st('Authcache has been enabled. Please configure your caching settings under <a href="@url">Site Configuration -> Performance -> Authcache</a>.', array(
'@url' => base_path() . 'admin/settings/performance/authcache',
)), 'warning');
authcache_user('login', $user, $user);
}
function authcache_disable() {
}
function authcache_install() {
db_query("UPDATE {system} SET weight = -90 WHERE name = '%s'", 'authcache');
}
function authcache_uninstall() {
db_query("DELETE FROM {variable} WHERE name LIKE '%s_%%'", 'authcache');
cache_clear_all('variables', 'cache');
}