Caching
Installation
composer require saloonphp/cache-plugin "^1.0"Configuration
<?php
use Sammyjo20\SaloonCachePlugin\Traits\AlwaysCacheResponses;
class GetForgeServerRequest extends SaloonRequest
{
use AlwaysCacheResponses;
// ...
public function cacheDriver(): DriverInterface
{
//
}
public function cacheTTLInSeconds(): int
{
return 7200;
}
}Cache Drivers
FlysystemDriver
LaravelCacheDriver
SimpleCacheDriver (PSR-16 Compatible)
Response
Custom Cache Keys
Disable Caching
Invalidating Cache
Source Code
Last updated