community_tags_authcache.install in Community Tags 6.2
The install file for the community_tags_authcache module.
File
community_tags_authcache/community_tags_authcache.install
View source
<?php
define('COMMUNITY_TAGS_AUTHCACHE_NOCACHE_DEFAULT', '
node/*/tagmgmt');
function community_tags_authcache_install() {
$pagecaching = variable_get('authcache_pagecaching', array(
array(
'option' => 0,
'pages' => AUTHCACHE_NOCACHE_DEFAULT,
'roles' => array(
DRUPAL_ANONYMOUS_RID,
),
),
));
$pagecaching[0]['pages'] .= COMMUNITY_TAGS_AUTHCACHE_NOCACHE_DEFAULT;
variable_set('authcache_pagecaching', $pagecaching);
}
function community_tags_authcache_uninstall() {
$pagecaching = variable_get('authcache_pagecaching', array());
if (!empty($pagecaching)) {
$pagecaching[0]['pages'] = str_replace(COMMUNITY_TAGS_AUTHCACHE_NOCACHE_DEFAULT, '', $pagecaching[0]['pages']);
variable_set('authcache_pagecaching', $pagecaching);
}
drupal_set_message(t('Community Tags Authcache integration has been uninstalled.'));
}