Skip to content

Instantly share code, notes, and snippets.

@avdg
Forked from dragoonis/gist:899817
Created April 2, 2011 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avdg/899822 to your computer and use it in GitHub Desktop.
Save avdg/899822 to your computer and use it in GitHub Desktop.
<?php
static function getCache($p_mOptions = null) {
if (!is_array($p_mOptions)) {
$config = self::getConfig();
$options = isset($config->cache) ? $config->cache->toArray() : array();
if (is_string($p_mOptions) && $p_mOptions !== '') {
$options['handler'] = $p_mOptions;
}
$p_mOptions = $options;
}
return new PPI_Cache($p_mOptions);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment