2017 © Pedro Peláez
 

library ha-apcu-middleware

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

image

itrnka/ha-apcu-middleware

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

  • Wednesday, November 15, 2017
  • by itrnka
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

APCu cache driver middleware for ha framework

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension. Driver implements cache interface ha\Middleware\Cache\Cache from ha framework. So it can be used as a cache driver., (*1)

Installation

Installation is available via composer:, (*2)

composer require itrnka/ha-apcu-middleware

Requirements

This package is based on ha framework. Composer installs ha framework if it is not already installed. APCu php module is also required., (*3)

Configuration

Required configuration keys:, (*4)

  • name: by ha framework requirements
  • keyPrefix: string prefix for cache keys in your application
  • defaultTTL: int default TTL value (must be >= 0)

Add your configuration to the configuration file in ha framework according to this example:, (*5)

Note: only single instance can be used in your application, class has pseudo singleton protection., (*6)

$cfg['middleware'] = [

    // ...

    // APCu cahce
    [
        ha\Middleware\Cache\APCu\APCu::class,
        [
            'name' => 'apc',
            'keyPrefix' => 'someUniqueKeyForAppInYourMachine',
            'defaultTTL' => 0,
        ]
    ],

    // ...

];

Then the driver will be available as follows:, (*7)

// middleware instance
$apc = main()->middleware->apc;

// example call:
$value = main()->middleware->apc->get('myValue', null);

The Versions

15/11 2017

dev-master

9999999-dev https://github.com/itrnka/ha-apcu-middleware

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

  Sources   Download

Apache-2.0

The Requires

 

by Avatar itrnka

apc apcu ha ha-framework

15/11 2017

v1.0.0

1.0.0.0 https://github.com/itrnka/ha-apcu-middleware

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

  Sources   Download

Apache-2.0

The Requires

  • php ^7.1

 

by Avatar itrnka

apc apcu ha

15/11 2017

v1.0.1

1.0.1.0 https://github.com/itrnka/ha-apcu-middleware

APCu cache middleware for ha framework. This is a proxy to PHP APCu extension.

  Sources   Download

Apache-2.0

The Requires

 

by Avatar itrnka

apc apcu ha