StoreInterface¶
StoreInterface for implementing a key-value store
Provide own Cache for performance improvements.
For example saving Session between multiple calls
```php
// cache adapter
<?php
use NextEvent\PHPSDK\Store\StoreInterface;
class MyCache implements StoreInterface
{
public function set($key, $value)
{
// your implementation
}
public function get($key)
{
// your implementation
}
public function clear()
{
// your implementation
}
}
?>
// initialize
<?php
$my_cache = new MyCache();
// on initialize
$ne_client = new \NextEvent\PHPSDK\Client($appUrl, $credentials, $widgetHash,
$my_cache);
// or
$ne_client->setCache($my_cache);
?>
```
« More »
OpcacheStore¶
Implements StoreInterface and stores its data in a temp file.
If __opcache__ is available, us this to cache temp file for performance
improvement.
« More »