Download the PHP package sfneal/caching without Composer
On this page you can find all versions of the php package sfneal/caching. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sfneal/caching
More information about sfneal/caching
Files in sfneal/caching
Package caching
Short Description Traits & interfaces for utilizing cache mechanisms to store frequently retrieved data.
License MIT
Homepage https://github.com/sfneal/caching
Informations about the package caching
Caching
Traits & interfaces for utilizing cache mechanisms to store frequently retrieved data in Laravel applications.
Installation
You can install the package via composer:
Usage
1. Add caching to an eloquent query
During the first call to (new CountUnreadInquiriesQuery())->fetch(600)
in a fresh application instance
(or for the first time since flushing the cache) the output of the execute method will be stored in
the Redis cache for 5 minutes (600 seconds).
If another call to (new CountUnreadInquiriesQuery())->fetch(600)
is made within the next 5 minutes, the
previous output will be retrieved from the Redis cache, forgoing the need to execute a full query to the
database. In this example the time saved is minimal but time saving become increasingly significant as
the complexity of a query increases.
Testing
Changelog
Please see CHANGELOG for more information 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.
Credits
- Stephen Neal
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate.
All versions of caching with dependencies
sfneal/redis-helpers Version ^1.4|^2.0|^3.0
laravel/framework Version ^8.75|^9.0|^10.0|^11.0