itrnka/ha-apcu-middleware 问题修复 & 功能扩展

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

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

itrnka/ha-apcu-middleware

Composer 安装命令:

composer require itrnka/ha-apcu-middleware

包简介

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

README 文档

README

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension. Driver implements cache interface ha\Middleware\Cache\Cache from ha framework. So it can be used as a cache driver.

Installation

Installation is available via composer:

composer require itrnka/ha-apcu-middleware

Requirements

This package is based on ha framework. Composer installs ha framework if it is not already installed. APCu php module is also required.

Configuration

Required configuration keys:

  • name: by ha framework requirements
  • keyPrefix: string prefix for cache keys in your application
  • defaultTTL: int default TTL value (must be >= 0)

Add your configuration to the configuration file in ha framework according to this example:

Note: only single instance can be used in your application, class has pseudo singleton protection.

$cfg['middleware'] = [

    // ...

    // APCu cahce
    [
        ha\Middleware\Cache\APCu\APCu::class,
        [
            'name' => 'apc',
            'keyPrefix' => 'someUniqueKeyForAppInYourMachine',
            'defaultTTL' => 0,
        ]
    ],

    // ...

];

Then the driver will be available as follows:

// middleware instance
$apc = main()->middleware->apc;

// example call:
$value = main()->middleware->apc->get('myValue', null);

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固