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);
?>
package |
NextEvent\PHPSDK\Store |
---|
clear() : void
delete(string $key)
string
expunge() : void
get(string $key) : mixed
string
mixed
has(string $key) : boolean
string
boolean
set(string $key, mixed $value, integer $ttl = null) : void
string
mixed
integer