2017 © Pedro Peláez
 

library json-cache

A caching module for storing data in a JSON file

image

ko/json-cache

A caching module for storing data in a JSON file

  • Friday, April 6, 2018
  • by peledies
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 13 % Grown

The README.md

json-cache

This module is built for caching responses from API's in a file. Its primary focus is on alleviating pressure from an API when data is not required to be up to the second. This is particularly useful when the API may have throttling or rate limiting in use., (*1)

Install

composer require ko/json-cache

Properties

Property Type Description
validity Integer Number of minutes the cache will be used before being declared invalid [ Default 15 ]
file String The path of the json cache file [ Default json-cache.json ]

Usage

Build the cache settings object, (*2)

  $KOCacheSettings = new \KO\Cache\Settings();
  $KOCacheSettings->setValidity(15);
  $KOCacheSettings->setFile('data_cache.json');

Instantiate a new cache object with the settings, (*3)

  $KOCache = new \KO\Cache\Cache($KOCacheSettings);

Documentation

See the full Documentation for more details., (*4)

The Versions

06/04 2018

dev-master

9999999-dev

A caching module for storing data in a JSON file

  Sources   Download

MIT

06/04 2018

0.0.6

0.0.6.0

A caching module for storing data in a JSON file

  Sources   Download

MIT

05/02 2018

0.0.5

0.0.5.0

A caching module for storing data in a JSON file

  Sources   Download

MIT

03/02 2018

0.0.4

0.0.4.0

A caching module for storing data in a JSON file

  Sources   Download

MIT

03/02 2018

0.0.3

0.0.3.0

A caching module for storing data in a JSON file

  Sources   Download

MIT

01/02 2018

0.0.2

0.0.2.0

A caching module for storing data in a JSON file

  Sources   Download

01/02 2018

0.0.1

0.0.1.0

A caching module for storing data in a JSON file

  Sources   Download