Download the PHP package tobento/service-cache without Composer
On this page you can find all versions of the php package tobento/service-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package service-cache
Cache Service
Providing PSR-6 and PSR-16 caches for PHP applications.
Table of Contents
- Getting started
- Requirements
- Highlights
- Documentation
- PSR 6 Cache
- Available Cache Item Pools
- File Storage Cache Item Pool
- Storage Cache Item Pool
- Array Cache Item Pool
- Psr16 Cache Item Pool
- Cache Item Pools
- Interfaces
- Cache Item Pool Factory Interface
- Cache Item Pools Interface
- Available Cache Item Pools
- PSR 16 Simple Cache
- Available Caches
- Psr6 Cache
- Caches
- Interfaces Simple
- Cache Factory Interface
- Caches Interface
- Available Caches
- Shared Interfaces
- Can Delete Expired Items
- PSR 6 Cache
- Credits
Getting started
Add the latest version of the cache service project running this command.
Requirements
- PHP 8.0 or greater
Highlights
- Framework-agnostic, will work with any project
- Decoupled design
Documentation
PSR 6 Cache
Available Cache Item Pools
File Storage Cache Item Pool
The file storage cache item pool using the File Storage Service to store the items.
First, you will need to install :
Then, create the File Storage you wish to use for pool:
Check out the Can Delete Expired Items interface to learn more about it.
Storage Cache Item Pool
The storage cache item pool using the Storage Service to store the items.
First, you will need to install :
Then, create the Storage you wish to use for pool:
Check out the Can Delete Expired Items interface to learn more about it.
Recommended table column types for (database) storage
Column | Type |
---|---|
id | VARCHAR(255) NOT NULL PRIMARY KEY |
data | MEDIUMBLOB NOT NULL |
expiration | TIMESTAMP |
namespace | VARCHAR(100) NOT NULL |
Array Cache Item Pool
The cache items will be stored in memory and not persisted outside the running PHP process in any way. Might be useful for testing purposes.
Psr16 Cache Item Pool
The Psr16 cache item pool using the defined Psr16 cache to store items.
Cache Item Pools
Create Pools
Add Pools
add
register
You may use the register method to only create the pool if requested.
Get Pool
If the pool does not exist or could not get created it throws a .
You may use the method to check if a pool exists.
You may use the method to get all pool names.
Default Pools
You may add default pools for your application design.
Interfaces
Cache Item Pool Factory Interface
You may use this interface for creating pools.
Cache Item Pools Interface
PSR 16 Simple Cache
Available Caches
Psr6 Cache
The Psr6 cache using the defined Psr6 pool to store items.
Check out the Can Delete Expired Items interface to learn more about it.
Caches
Create Caches
Add Caches
add
register
You may use the register method to only create the cache if requested.
Get Cache
If the cache does not exist or could not get created it throws a .
You may use the method to check if a cache exists.
You may use the method to get all cache names.
Default Caches
You may add default caches for your application design.
Interfaces Simple
Cache Factory Interface
You may use this interface for creating caches.
Caches Interface
Shared Interfaces
Can Delete Expired Items
Credits
- Tobias Strub
- All Contributors
All versions of service-cache with dependencies
tobento/service-clock Version ^1.0
tobento/service-iterable Version ^1.0
psr/cache Version ^2.0|^3.0
psr/simple-cache Version 2 - 3
psr/clock Version ^1.0