定制 firewox/simple-memory-cache 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

firewox/simple-memory-cache

Composer 安装命令:

composer require firewox/simple-memory-cache

包简介

Library for supporting any kind of in memory caching server using PSR-16 simple cache standard.

README 文档

README

Library for supporting any kind of in memory caching server using PSR-16 simple cache standard.

Getting Started

Use composer package manager to install Simple Memory Cache.

composer require firewox/simple-memory-cache

Prerequisites & configurations

This library requires at least PHP 7.1 to run. In your PHP file include composer autoload:

require_once 'vendor/autoload.php';

Structuring your code

Simple memory cache library attempts to abstract all the known in-memory cache server methods using a common interface. This library implements all the methods as defined in PSR 16 standard (https://www.php-fig.org/psr/psr-16/).

  1. Cache one item to memory using Redis
$redis = new Redis();
$status = $redis->set('test', 'hello world', 300);
  1. Get one item cached in memory using Redis
$redis = new Redis();
$value = $redis->get('test');
  1. Delete one item cached in memory using Redis
$redis = new Redis();
$value = $redis->delete('test');
  1. Cache multiple items to memory using Redis
$redis = new Redis();
$status = $redis->setMultiple(['test1' => 'hello', 'test2' => 'world'], 300);
  1. Get multiple items cached in memory using Redis
$redis = new Redis();
$values = $redis->getMultiple(['test1' => 'hello', 'test2' => 'world']);
  1. Delete multiple items cached in memory using Redis
$redis = new Redis();
$value = $redis->deleteMultiple(['test1', 'test2']);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固