Skip to content

truongwp/php-static-caching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 );
}

About

PHP caching class uses static variable to cache data during runtime

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages