horde/memcache 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

horde/memcache

最新稳定版本:v3.0.0beta2

Composer 安装命令:

composer require horde/memcache

包简介

Memcache client library

README 文档

README

PSR-16 compliant memcache wrapper with Horde-specific extensions.

Installation

composer require horde/memcache

Quick Start

use Horde\Memcache\{MemcacheApi, Config};

$config = new Config(
    hostspec: ['127.0.0.1'],
    port: [11211],
    prefix: 'myapp_'
);

$cache = new MemcacheApi($config);

// PSR-16 interface (standard)
$cache->set('key', 'value', 3600);
$value = $cache->get('key', 'default');
$cache->delete('key');

// Horde Extended interface (large items, multi-key)
$cache->setLarge('report', $hugeData, 3600);  // >1MB OK
$values = $cache->getItems(['k1', 'k2', 'k3']);
$cache->deleteDelayed('lock', 30);

Two Interfaces

PSR-16 (Standard)

get set delete clear has getMultiple setMultiple deleteMultiple

  • Standard cache operations
  • Items < 1MB
  • Framework-portable

HordeMemcacheInterface (Extended)

getLarge setLarge getItems deleteDelayed

  • Large items (>1MB auto-chunking)
  • Multi-key batch retrieval
  • Delete with timeout

Extensions Supported

Both Memcache and Memcached PHP extensions fully supported with equal features.

Requirements

  • PHP 8.1+
  • memcache or memcached PHP extension
  • memcached server

Documentation

License

LGPL 2.1 - See LICENSE file

统计信息

  • 总下载量: 132
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 2

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1
  • 更新时间: 2023-12-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固