StoreInterface for implementing a key-value store
Provide own Cache for performance improvements. For example saving Session between multiple calls
// 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);
?>