Professional LAMP Linux Apache, MySQL and PHP5 Web Development phần 9

Phương pháp này tạo ra và mở ra một kết nối đến một máy chủ memcached chạy trên máy chủ. Các tham số cổng xác định cổng TCP được sử dụng bởi memcached, mặc định là 11211, và thời gian chờ xác định bao lâu để chờ đợi khi cố gắng để kết nối trước khi trở về FALSE. Trả về trung thực về thành công, FALSE về thất bại. ❑ memcache:: lượng giảm | Chapter 12 Memcache connect bool Memcache connect string host int port int timeout This method creates and opens a connection to a memcached server running on host. The port parameter specifies the TCP port used by memcached the default being 11211 and timeout specifies how long to wait when attempting to connect before returning FALSE. Returns true on success FALSE on failure. Memcache decrement int Memcache decrement string key int value When storing a simple numeric value in the memory cache you can actually use the decre-ment method to decrease the value matching key by the provided value. If no decrement value is specified the cached value is decremented by 1. This method returns FALSE on failure or the item s new value upon success. Memcache delete bool Memcache delete string key int timeout This method deletes the item identified by key from the memory cache. Providing a value for timeout causes the item to be deleted after the provided number of seconds. Returns FALSE on failure and TRUE on success. Memcache flush bool Memcache flush void This method tells memcached to immediately set the expiration on all items in the cache. Once this method is called any item in the cache can be overwritten by new keys but the memory is not released until that happens. This method returns TRUE on success or FALSE on failure. Memcache get string Memcache get string key string Memcache get array keys This method retrieves an item or items stored in the memory cache matching the given key or array of keys. It returns either a string or array on success depending on how many keys were provided to match against and FALSE if no keys are found matching the input parameters. Memcache getStats array Memcache getStats void This returns an array containing various bits of information regarding the status of the memory cache such as current and total connections number of cached items and server uptime. Memcache getVersion string Memcache getVersion void This returns a simple string

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
55    321    1    28-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.