本文整理匯總了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);
}