Guides
Cache
Guide for using cache with FNE Client
Cache
This guide shows you how to use cache with FNE Client to improve performance.
Overview
FNE Client supports cache via the PSR-16 interface. Cache allows storing API responses to avoid repeated calls.
Configuration
Laravel
Cache automatically uses the Laravel cache system:
Symfony
For Symfony, you can use the Symfony cache:
Native PHP
For native PHP, an in-memory cache is used by default. You can implement your own cache by implementing CacheInterface.
Usage
Cache is automatically used during API calls:
Cache Keys
Cache keys are automatically generated from the endpoint and payload:
Time to Live (TTL)
Cache time to live is configurable:
Disable Cache
Globally
For a Specific Call
Cache is not used for refunds by default, as they modify state.
Custom Cache
You can implement your own cache by implementing CacheInterface:
Next Steps
- Logging - Configure logging
- Performance - Optimize performance
Need help? Check out the complete documentation or open an issue on GitHub.
