phyrexia/cache

This package is abandoned and no longer maintained. The author suggests using the symfony/cache package instead.

PHP classes for caching singletons

1.0.2 2019-09-01 22:06 UTC

This package is auto-updated.

Last update: 2021-11-16 18:42:25 UTC


README

PHP classes for caching singletons

Latest Stable Version License

Requirements

  • PHP >= 5.3

Suggestions

  • PHP extension memcached

Installation

Install directly via Composer:

$ composer require phyrexia/cache

Basic Usage

Memcached

<?php
require 'vendor/autoload.php';

use Phyrexia\Cache\Memcached;

//First call: generate instance (next calls won't need parameters, Singleton <3)
$mc = Memcached::getInstance(HOST, PORT);

//Do stuff
$r = Memcached::getInstance()->set('key', 'value');