[Beeframework-svn] SF.net SVN: beeframework:[95] trunk/framework/Bee/Cache
Brought to you by:
b_hartmann,
m_plomer
|
From: <m_p...@us...> - 2013-09-25 23:33:41
|
Revision: 95
http://sourceforge.net/p/beeframework/code/95
Author: m_plomer
Date: 2013-09-25 23:33:37 +0000 (Wed, 25 Sep 2013)
Log Message:
-----------
- bee cache augmented with some logging
Modified Paths:
--------------
trunk/framework/Bee/Cache/Manager.php
trunk/framework/Bee/Cache/Provider/APC.php
trunk/framework/Bee/Cache/Provider/Base.php
trunk/framework/Bee/Cache/Provider/File.php
Modified: trunk/framework/Bee/Cache/Manager.php
===================================================================
--- trunk/framework/Bee/Cache/Manager.php 2013-09-24 23:33:38 UTC (rev 94)
+++ trunk/framework/Bee/Cache/Manager.php 2013-09-25 23:33:37 UTC (rev 95)
@@ -47,7 +47,22 @@
private static $useSessionCacheFallback = true;
/**
- * Map PHP cache extension names to class name of the respective cache provider adapter
+ * @var \Logger
+ */
+ private static $log;
+
+ /**
+ * @return \Logger
+ */
+ protected static function getLog() {
+ if (!self::$log) {
+ self::$log = \Bee_Framework::getLoggerForClass(__CLASS__);
+ }
+ return self::$log;
+ }
+
+ /**
+ * Map PHP cache extension names to class name of the respective cache provider adapter
*
* @var array
*/
@@ -79,9 +94,11 @@
}
private static function initProviderClass($providerClass) {
+ static::getLog()->info('initializing cache provider class ' . $providerClass);
$loc = Bee_Framework::getClassFileLocations($providerClass);
require_once $loc[0];
self::$provider = new $providerClass();
+ static::getLog()->info('cache initialized : ' . static::$provider);
}
public static function init($providerInstanceOrClassName = false) {
Modified: trunk/framework/Bee/Cache/Provider/APC.php
===================================================================
--- trunk/framework/Bee/Cache/Provider/APC.php 2013-09-24 23:33:38 UTC (rev 94)
+++ trunk/framework/Bee/Cache/Provider/APC.php 2013-09-25 23:33:37 UTC (rev 95)
@@ -68,6 +68,5 @@
//
// protected final function doRetrieveSerialized($key) {
// return apc_fetch($key);
-// }
+// }
}
-?>
\ No newline at end of file
Modified: trunk/framework/Bee/Cache/Provider/Base.php
===================================================================
--- trunk/framework/Bee/Cache/Provider/Base.php 2013-09-24 23:33:38 UTC (rev 94)
+++ trunk/framework/Bee/Cache/Provider/Base.php 2013-09-25 23:33:37 UTC (rev 95)
@@ -51,5 +51,8 @@
protected final function getTTL($etime) {
return $etime - time();
}
+
+ function __toString() {
+ return get_class($this)."{}";
+ }
}
-?>
\ No newline at end of file
Modified: trunk/framework/Bee/Cache/Provider/File.php
===================================================================
--- trunk/framework/Bee/Cache/Provider/File.php 2013-09-24 23:33:38 UTC (rev 94)
+++ trunk/framework/Bee/Cache/Provider/File.php 2013-09-25 23:33:37 UTC (rev 95)
@@ -96,4 +96,8 @@
}
return true;
}
+
+ function __toString() {
+ return __CLASS__."{cacheDir={$this->cacheDir},cacheFile={$this->cacheFile}}";
+ }
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|