first commit
This commit is contained in:
23
modules/payu/tools/PayuOauthCache/OauthCachePresta.php
Normal file
23
modules/payu/tools/PayuOauthCache/OauthCachePresta.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class OauthCachePresta implements OauthCacheInterface
|
||||
{
|
||||
const PAYU_CACHE_CONFIG_PREFIX = 'PAYU_';
|
||||
|
||||
public function get($key)
|
||||
{
|
||||
$cache = Configuration::get(self::PAYU_CACHE_CONFIG_PREFIX . $key);
|
||||
return $cache === false ? null : unserialize($cache);
|
||||
}
|
||||
|
||||
public function set($key, $value)
|
||||
{
|
||||
return Configuration::updateValue(self::PAYU_CACHE_CONFIG_PREFIX . $key, serialize($value));
|
||||
}
|
||||
|
||||
public function invalidate($key)
|
||||
{
|
||||
return Configuration::deleteByName(self::PAYU_CACHE_CONFIG_PREFIX . $key);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user