本文整理汇总了PHP中memcache_flush函数的典型用法代码示例。如果您正苦于以下问题:PHP memcache_flush函数的具体用法?PHP memcache_flush怎么用?PHP memcache_flush使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了memcache_flush函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flush_all
public function flush_all()
{
if (!is_resource($this->memcache)) {
throw new \Exception("Memcached can't connect.");
}
return memcache_flush($this->memcache);
}
示例2: setUp
public function setUp()
{
if ($this->mmcError) {
return;
}
$this->mmc = memcache_connect('localhost', 11211);
memcache_flush($this->mmc);
}
示例3: setUp
public function setUp()
{
if ($this->mmcError) {
return;
}
if (isset($this->conf['servers'])) {
list($this->mmhost, $this->mmport) = explode(":", $this->conf['servers']);
}
$mmc = memcache_connect($this->mmhost, $this->mmport);
memcache_flush($mmc);
}
示例4: resetCache
/**
* 重设缓存
*/
public function resetCache()
{
if ($this->config->cacheMode == 'Mysql') {
#1.Mysql模式
$table = $this->db->getPrefix() . self::$tableName;
$this->db->query("TRUNCATE TABLE {$table} ");
} else {
#2.SAE模式
$mc = memcache_init();
memcache_flush($mc);
}
$this->request->throwJson('success');
}
示例5: changeCountItemsById
function changeCountItemsById($id, $val)
{
$config = getConfig();
$params = $config['memcache'];
$table = ['name' => 'item', 'dbname' => 'db_vktest', 'as' => 'i'];
$mysqli = db_mysqli_connect($table['dbname']);
$queryUpdate = 'UPDATE store SET countitems = countitems + ' . intval($val) . ' WHERE idstore = ' . intval($id);
$resultUpdate = mysqli_query($mysqli, $queryUpdate);
db_mysqli_close($mysqli);
$memcache = memcache_connect($params['host'], $params['port']);
memcache_flush($memcache);
memcache_close($memcache);
}
示例6: flush
/**
* 刷新memcache的缓存,所有的项目
* @return boolean
*/
public function flush()
{
return memcache_flush($this->connection);
}
示例7: put_feedback
public static function put_feedback($employee_id, $name_of_client, $text_of_feedback, $rank_stat, $positive_sides, $negative_sides)
{
//положить отзыв в базу
$db = Db::getConnection();
$query = $db->prepare("INSERT INTO feedbacks(id, employee_id_f, cunsumer_name, feedback_publication_date, feedback_text, empl_rank, positive, negative) \n\t\t\t\t\t\t\t\tVALUES (NULL,:employee_id_f,:cunsumer_name, CURRENT_TIMESTAMP,:feedback_text,:empl_rank,:positive,:negative);");
$query->execute(array('employee_id_f' => "{$employee_id}", 'cunsumer_name' => "{$name_of_client}", 'feedback_text' => "{$text_of_feedback}", 'empl_rank' => "{$rank_stat}", 'positive' => "{$positive_sides}", 'negative' => "{$negative_sides}"));
$mc = memcache_connect('185.87.49.111', 11211);
memcache_flush($mc);
return $query;
}
示例8: clear_cache
function clear_cache()
{
memcache_flush(get_memcache_connect());
}
示例9: flush
public static function flush()
{
if (self::$conn == null) {
self::init();
}
return memcache_flush(self::$conn);
}
示例10: clear
static function clear()
{
if (self::connect()) {
memcache_flush(CGlobal::$memcache_connect_id);
}
return true;
}
示例11: clearCache
function clearCache()
{
global $memcacheServerName, $memcachePort;
$memcache_obj = memcache_connect($memcacheServerName, $memcachePort);
memcache_flush($memcache_obj);
}
示例12: flush
function flush()
{
return memcache_flush($this->object);
}
示例13: memFlush
public function memFlush()
{
memcache_flush(self::$client);
}
示例14: flush
/**
* 刷新缓存但不释放内存空间
*
*/
public function flush()
{
memcache_flush($this->memcache);
}
示例15: flush
public static function flush()
{
return \memcache_flush(self::$connection);
}