Diff of /mambo/branches/4.6/includes/core.classes.php
Parent Directory
|
Revision Log
|
Patch
| revision 1647, Wed Mar 19 15:15:13 2008 UTC | revision 1648, Thu Mar 20 04:13:15 2008 UTC | |
|---|---|---|
| # | Line 2766 | Line 2766 |
| 2766 | /** | /** |
| 2767 | * @return object A function cache object | * @return object A function cache object |
| 2768 | */ | */ |
| 2769 | function &getCache( $group='' ) { | function &getCache( $group='', $plugin = 'Function' ) { |
| 2770 | if (!in_array($plugin,array('Function','Output'))){ | |
| 2771 | die('Cache plugin not available'); | |
| 2772 | } | |
| 2773 | $mosConfig_absolute_path = mamboCore::get('mosConfig_absolute_path'); | $mosConfig_absolute_path = mamboCore::get('mosConfig_absolute_path'); |
| 2774 | require_once($mosConfig_absolute_path.'/includes/Cache/Lite/Function.php'); | require_once($mosConfig_absolute_path.'/includes/Cache/Lite/'.$plugin.'.php'); |
| 2775 | $path = mamboCore::get('mosConfig_cachepath'); | $path = mamboCore::get('mosConfig_cachepath'); |
| 2776 | $caching = mamboCore::get('mosConfig_caching'); | $caching = mamboCore::get('mosConfig_caching'); |
| 2777 | $time = mamboCore::get('mosConfig_cachetime'); | $time = mamboCore::get('mosConfig_cachetime'); |
| # | Line 2778 | Line 2781 |
| 2781 | 'defaultGroup' => $group, | 'defaultGroup' => $group, |
| 2782 | 'lifeTime' => $time | 'lifeTime' => $time |
| 2783 | ); | ); |
| 2784 | $cache =& new Cache_Lite_Function( $options ); | $className = 'Cache_Lite_'.$plugin; |
| 2785 | $cache =& new $className( $options ); | |
| 2786 | return $cache; | return $cache; |
| 2787 | } | } |
| 2788 | /** | /** |
|
||||||||
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

