Skip to content

Instantly share code, notes, and snippets.

@splittingred
Created May 12, 2011 13:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save splittingred/968491 to your computer and use it in GitHub Desktop.
Save splittingred/968491 to your computer and use it in GitHub Desktop.
if (!empty($options['showBoards'])) {
$c = array(
'board' => 0,
'groups' => $_groups,
);
if (!empty($scriptProperties['category'])) $c['category'] = (int)$scriptProperties['category'];
$cacheKey = 'discuss/board/user/'.$discuss->user->get('id').'/index-'.md5(serialize($c));
$boardIndex = $modx->cacheManager->get($cacheKey);
if (empty($boardIndex)) {
$boardIndex = $discuss->hooks->load('board/getlist',$c);
$modx->cacheManager->set($cacheKey,$boardIndex,3600);
}
$placeholders['boards'] = $boardIndex;
unset($boardIndex);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment