mezon/cache 问题修复 & 功能扩展

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

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

mezon/cache

最新稳定版本:1.0.1

Composer 安装命令:

composer require mezon/cache

包简介

Small cache script

README 文档

README

Intro

Mezon provides simple cache class. Wich will help you to test how caching will affect performance of your code. If the performance will be boosted, then you can implement more complex solutions for caching.

Installation

Just print in console

composer require mezon/cache

And that's all )

How to use?

First of all we need to create single instance of cache ("singleton" pattern is used):

$cache = Cache::getInstance();

Then we can add data to cache:

$cache->set('key', 'data to be stored');

After all data was added you need to store it to be able using it within other requests.

$cache->flush();

And then you can check if the key exists:

var_dump($cache->exists('key')); // bool(true)
var_dump($cache->exists('unexisting-key')); // bool(false)

And then you can fetch data by it's key:

var_dump($cache->get('key')); // string('data to be stored')

That's all for now )

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固