Download the PHP package gregoriohc/static-cache without Composer
On this page you can find all versions of the php package gregoriohc/static-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gregoriohc/static-cache
More information about gregoriohc/static-cache
Files in gregoriohc/static-cache
Package static-cache
Short Description PHP simple static cache class
License MIT
Homepage https://github.com/gregoriohc/static-cache
Informations about the package static-cache
static-cache
PHP simple static cache class
Install
Via Composer
Usage
Checking for item existence
Storing item
Retrieving item
If you wish, you may pass a second argument to the get
method specifying the default value you wish to be returned if the item doesn't exist:
You may even pass a Closure
as the default value. The result of the Closure
will be returned if the specified item does not exist in the cache:
Retrieve and store item
Sometimes you may wish to retrieve an item from the cache, but also store a default value if the requested item doesn't exist. You may do this using the remember
method:
If the item does not exist in the cache, the Closure passed to the remember method will be executed and its result will be placed in the cache.
Removing item
Testing
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Socialware
You're free to use this package, but if it makes it to your production environment I highly appreciate you sharing it on any social network.
Credits
- Gregorio Hernández Caso
- All Contributors
License
The MIT License (MIT). Please see License File for more information.