diff --git a/php/cache/cache.php b/php/cache/cache.php new file mode 100644 index 0000000..10ea2dc --- /dev/null +++ b/php/cache/cache.php @@ -0,0 +1,23 @@ + + **/ + +namespace Federator\Cache; + +/** + * Caching class using redis + */ +class RedisCache implements Cache +{ + /** @var \Redis connection handle */ + private $redis; + + public function __construct() + { + } + + /** + * get remote user by given session + * @param string $_session session id + * @param string $_user user/profile name + * @return \Data\User | null + */ + public function getRemoteUserBySession(string $_session, string $_user) + { + } + + public function saveRemoteUserBySession(string $_session, string $_user, \Federator\Data\User $user) + { + } +} + +function dummy_rediscache(\Federator\Main $main) +{ + $rc = new RedisCache(); + $main->setCache($rc); +}