theriskus/cache

安装: 8

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:package

dev-master 2019-10-02 09:25 UTC

This package is auto-updated.

Last update: 2024-09-04 21:55:38 UTC


README

需求

  1. PHP 5.6 > above
  2. Composer
  3. Redis 5.0 (可选)
  4. Memcached 1.5.X (可选)

安装

要安装此模块,您应该使用composer库:composer require theriskus/cache

简单使用

  1. 为了初始化,在您的引导文件中添加以下内容:Cache::init(driver);并添加use WorkTestMax\Classes\Cache
驱动必须是字符串,且等于:'redis'或'memcached'或'file'
  1. 为了设置任何参数:Cache::set(string $cache_id, mixed $data, int $ttl, string $sub_dir = '')
  2. 为了获取任何参数:Cache::get(string $cache_id, string $sub_dir = '');