truongwp/php-static-cache

PHP caching class uses static variable to cache data during runtime

Installs: 28

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/truongwp/php-static-cache

0.1.0 2017-08-28 02:43 UTC

This package is not auto-updated.

Last update: 2025-10-04 00:56:49 UTC


README

PHP caching class uses static variable to cache data during runtime

Installation

Use composer to include the library:

composer require truongwp/php-static-cache

Example

$static_cache = new \Truongwp\StaticCache();

if ( $static_cache->has( 'key' ) ) {
	$value = $static_cache->get( 'key' );
} else {
	$value = do_something();
	$static_cache->set( 'key', $value );
}