Memcache Memcache 클래스
(PECL memcache >= 0.2.0)
소개
Memcache 서버 집합에 대한 연결을 나타냅니다.
클래스 개요
class Memcache {
add(
string $key,
mixed $var,
int $flag = ?,
int $expire = ?
): bool
addServer(
string $host,
int $port = 11211,
bool $persistent = ?,
int $weight = ?,
int $timeout = ?,
int $retry_interval = ?,
bool $status = ?,
callable $failure_callback = ?,
int $timeoutms = ?
): bool
close(): bool
connect(string $host, int $port = ?, int $timeout = ?): bool
decrement(string $key, int $value = 1): int|false
delete(string $key, int $timeout = 0): bool
flush(): bool
get(string $key, int &$flags = ?): string
getExtendedStats(string $type = ?, int $slabid = ?, int $limit = 100): array
getServerStatus(string $host, int $port = 11211): int
getStats(string $type = ?, int $slabid = ?, int $limit = 100): array|false
getVersion(): string|false
increment(string $key, int $value = 1): int|false
pconnect(string $host, int $port = ?, int $timeout = ?): mixed
replace(
string $key,
mixed $var,
int $flag = ?,
int $expire = ?
): bool
set(
string $key,
mixed $var,
int $flag = ?,
int $expire = ?
): bool
setCompressThreshold(int $threshold, float $min_savings = ?): bool
setServerParams(
string $host,
int $port = 11211,
int $timeout = ?,
int $retry_interval = false,
bool $status = ?,
callable $failure_callback = ?
): bool
}
목차
- Memcache::add — 서버에 항목 추가
- Memcache::addServer — 연결 풀에 memcached 서버 추가
- Memcache::close — memcached 서버 연결 닫기
- Memcache::connect — memcached 서버 연결 열기
- Memcache::decrement — 아이템 값 감소
- Memcache::delete — 서버에서 항목 삭제
- Memcache::flush — 서버의 모든 기존 항목 플러시
- Memcache::get — 서버에서 아이템 회수
- Memcache::getExtendedStats — 풀의 모든 서버에서 통계 가져오기
- Memcache::getServerStatus — 서버 상태를 반환
- Memcache::getStats — 서버 통계 가져오기
- Memcache::getVersion — 서버의 반환 버전
- Memcache::increment — 목 값 증가
- Memcache::pconnect — memcached 서버 영구 연결 열기
- Memcache::replace — 기존 항목의 값 바꾸기
- Memcache::set — 서버에 데이터 저장
- Memcache::setCompressThreshold — 큰 값의 자동 압축 활성화
- Memcache::setServerParams — 런타임 시 서버 매개변수 및 상태 변경