当前位置: 首页>>代码示例>>PHP>>正文


PHP ObjectCache::writeLog方法代码示例

本文整理汇总了PHP中ObjectCache::writeLog方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectCache::writeLog方法的具体用法?PHP ObjectCache::writeLog怎么用?PHP ObjectCache::writeLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ObjectCache的用法示例。


在下文中一共展示了ObjectCache::writeLog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 public function save(array $data)
 {
     if (apc_add(parent::getName(), serialize($data), parent::getTimeToLive()) === false) {
         # logging me hearties
         # logging me hearties
         $types = parent::getTypes();
         $urgency = parent::getUrgency();
         parent::writeLog($types['error'], $urgency['high'], 'Could not successfully save to cache', 'APC Cache info: ' . PHP_EOL . serialize(apc_cache_info()));
         return false;
     }
     return true;
 }
开发者ID:RoneilZA,项目名称:dashboards,代码行数:12,代码来源:CacheApc.2011.07.25.php

示例2: load

 public function load()
 {
     if ($this->__testForApc() === false) {
         return false;
     }
     if (($data = apc_fetch(parent::getName())) === false) {
         # logging me hearties
         $types = parent::getTypes();
         $urgency = parent::getUrgency();
         parent::writeLog($types['notice'], array_key_exists("low", $urgency) ? $urgency["low"] : "", 'Could not successfully read from cache', 'APC Cache info: ' . PHP_EOL . serialize(apc_cache_info()));
         return false;
     }
     return unserialize($data);
 }
开发者ID:RoneilZA,项目名称:dashboards,代码行数:14,代码来源:CacheApc.php

示例3: _testForCacheDateTable

 private function _testForCacheDateTable()
 {
     $query = (string) "describe `cache_query_times`;";
     if (self::query($query, false) === false) {
         $query = (string) "create table `cache_query_times` (\n\t\t\t\t`id` integer(100) unsigned not null auto_increment primary key,\n\t\t\t\t`table` char(200),\n\t\t\t\t`timestamp` integer(100) unsigned not null default 0,\n\t\t\t\tindex `cacheQueryTimes` (`table`(100), `timestamp`)\n\t\t\t) engine=InnoDb default charset=UTF8;";
         if (self::query($query, false) === false) {
             # logging me hearties
             $types = parent::getTypes();
             $urgency = parent::getUrgency();
             parent::writeLog($types['error'], $urgency['high'], 'Could not successfully create table for cache timing', "mySQL returned the following error: " . self::getConnection()->real_escape_string(self::getConnection()->error) . "\n");
             return false;
         }
         return true;
     }
     return true;
 }
开发者ID:RoneilZA,项目名称:dashboards,代码行数:16,代码来源:CacheMysql.php


注:本文中的ObjectCache::writeLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。