theriskus/cache

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:package

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

This package is auto-updated.

Last update: 2024-10-04 22:14:47 UTC


README

Requirements

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

Installing

To install this module, you're should use composer library : composer require theriskus/cache

Simple use:

  1. For initialize add to your bootstrap file this: Cache::init(driver); and add use WorkTestMax\Classes\Cache
Driver must be string and equal: 'redis' or 'memcached' or 'file'
  1. For set any params: Cache::set(string $cache_id, mixed $data, int $ttl, string $sub_dir = '')
  2. For get any params: Cache::get(string $cache_id, string $sub_dir = '');