2017 © Pedro Peláez
 

library php-json-cache

JSON-based PSR-16 cache implementation.

image

infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  • Monday, November 13, 2017
  • by alessandroraffa
  • Repository
  • 2 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

"infobiotech logo", (*1)

infobiotech/php-json-cache

Minimum PHP Version Latest Stable Version Latest Unstable Version Total Downloads composer.lock License, (*2)

A key-value JSON-based PSR-16 cache implementation., (*3)

Built with: * PHP-FIG PSR-16: a common interface for caching libraries. * Psr\SimpleCache: a repository that holds all interfaces related to PSR-16. * League\Flysystem: a filesystem abstraction that allows to easily swap out a local filesystem for a remote one., (*4)


Here our Quality Assurance indicators for master git branch., (*5)

build status code coverage code quality
Travis CI Build Status
CodeCov codecov
Scrutinizer Build Status Scrutinizer Code Quality
Code Climate Maintainability
Codacy Codacy Badge Codacy Badge

Why JSON?

  • In some situations, remote web hosts do not support (or do not allow to install) major cache drivers.
  • JSON objects allow to set/get key-value items.

Getting Started

Prerequisites

  • PHP 5.6 or greater (including 7.0, 7.1 and HHVM)

Installing via composer

Make sure you have composer installed., (*6)

Then run the following command from your project root:, (*7)

$ composer require infobiotech/php-json-cache

Usage

infobiotech/php-json-cache implements PSR-16 and thus provides a standardized API for storing and retrieving data., (*8)

Here is a simple use case:, (*9)

<?php

require 'vendor/autoload.php';

$flysystemAdapter = new League\Flysystem\Adapter\Local('.');

$jsonCache         = new Infobiotech\JsonCache\Psr16\Driver($flysystemAdapter, uniqid());

$jsonCache->set('key', 'value'); // return TRUE

$jsonCache->get('key'); // return 'value'

Migrations

From v0.x to v1.x

Due to a deep refactor and restructure, the instantiation code must change from this:, (*10)

$jsonCache = new Infobiotech\JsonCache(/* your adapter and your namespace */);

to this:, (*11)

$jsonCache = new Infobiotech\JsonCache\Psr16\Driver(/* your adapter and your namespace */);

The API is unchanged., (*12)

Other PSR-16 implementations

Tests

Running Tests

Run the following command from your project root:, (*13)

$ ./vendor/bin/phpunit

Running PHP Code Sniffer

Run the following command from your project root:, (*14)

$ ./vendor/bin/phpcs src --standard=psr2 -sp

Versioning

We try to follow SemVer for versioning. For the versions available, see the tags on this repository., (*15)

Authors

Contributing

Contributions are welcome and will be credited., (*16)

Please read CONTRIBUTING.md for details on our code of conduct., (*17)

License

This project is licensed under the MIT License - see the LICENSE.md file for details, (*18)

The Versions

13/11 2017

dev-master

9999999-dev https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

09/11 2017

v1.0.1-alpha

1.0.1.0-alpha https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

09/11 2017

v1.0.0-alpha

1.0.0.0-alpha https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

08/11 2017

dev-stable

dev-stable https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

07/11 2017

v0.3.0

0.3.0.0 https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

07/11 2017

v0.3.0-beta

0.3.0.0-beta https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

07/11 2017

v0.2.0-beta

0.2.0.0-beta https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

06/11 2017

v0.1.1-alpha

0.1.1.0-alpha https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache json psr-16 flysistem

06/11 2017

v0.1.0-alpha

0.1.0.0-alpha https://github.com/infobiotech/php-json-cache

JSON-based PSR-16 cache implementation.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alessandro Raffa, Infobiotech S.r.l.

cache