定制 sarahman/simple-filesystem-cache 二次开发

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

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

sarahman/simple-filesystem-cache

最新稳定版本:1.0.2

Composer 安装命令:

composer require sarahman/simple-filesystem-cache

包简介

Simple file system cache library for PHP built on top of PSR-16.

README 文档

README

PHP Cache library built by PSR-16 simple cache interface

You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package.

Installation

  • Run this command: composer require sarahman/simple-filesystem-cache

Usages

  • Create a file named test.php in your root directory and add these following codes:
<?php

require "vendor/autoload.php";

$cache = new Sarahman\SimpleCache\FileSystemCache(); // the custom cache directory can be set through the parameter.

// Set Cache key.
$data = [
    'sample' => 'data',
    'another' => 'data'
];

$cache->set('your_custom_key', $data);

// Check cached key exists or not.
$cache->has('your_custom_key');

// Get Cached key data.
$cache->get('your_custom_key');
  • then run php test.php

For Documentations

psr/simple-cache-implementation

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-23