Download the PHP package yiranzai/file-cache without Composer
On this page you can find all versions of the php package yiranzai/file-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yiranzai/file-cache
More information about yiranzai/file-cache
Files in yiranzai/file-cache
Package file-cache
Short Description PHP File Cache, use Separate Chaining resolve hash conflict. one cache, one file, one bucket.
License MIT
Homepage https://github.com/yiranzai/php-file-cache
Informations about the package file-cache
file-cache
PHP File Cache, use Separate Chaining resolve hash conflict. one cache, one file, one bucket.
Feature
- Cache can set expired time.
- Use Separate Chaining resolve hash conflict.
- Hash key is the path to store data.
Structure
If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.
Install
Via Composer
Usage
API
This package provides these methods.
put($key, $data, $minutes): Cache
put one cache to file,set expired time$minutes
can be aint
orDateTime
ornull
or Supported Date and Time Formats
forever($key, $data): Cache
forever save one cache to fileget($key, $default = null): ?string
get the data corresponding to the keydelete($key): bool
delete one cacheflush(): void
delete all cachedataPath($path): self
change data save path
Demo
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- yiranzai
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of file-cache with dependencies
ext-json Version *
ext-fileinfo Version *