Sets the PSR-16 cache for storing and retrieving cached data.
Description
The cache can be used to store AI responses and other data to avoid redundant API calls and improve performance.
Parameters
$cacheWordPressAiClientDependenciesPsrSimpleCacheCacheInterface|nullrequired- The PSR-16 cache instance, or null to disable caching.
Source
public static function setCache(?CacheInterface $cache): void
{
self::$cache = $cache;
}
Changelog
| Version | Description |
|---|---|
| 0.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.