2024-07-17 11:47:48 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* SPDX-FileCopyrightText: 2024 Sascha Nitsch (grumpydeveloper) https://contentnation.net/@grumpydevelop
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*
|
|
|
|
* @author Sascha Nitsch <grumpydevelop@contentnation.net>
|
|
|
|
**/
|
|
|
|
|
|
|
|
namespace Federator\Cache;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Caching class using redis
|
|
|
|
*/
|
|
|
|
class RedisCache implements Cache
|
|
|
|
{
|
2024-07-17 15:45:19 +02:00
|
|
|
/**
|
|
|
|
* connection handle
|
|
|
|
*
|
|
|
|
* @var \Redis $redis
|
|
|
|
*/
|
2024-07-17 11:47:48 +02:00
|
|
|
private $redis;
|
2024-07-17 15:45:19 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* constructor
|
|
|
|
*/
|
2024-07-17 11:47:48 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2024-07-17 15:45:19 +02:00
|
|
|
* {@inheritDoc}
|
2024-07-17 11:47:48 +02:00
|
|
|
*/
|
2024-07-17 15:45:19 +02:00
|
|
|
public function getRemoteUserBySession($_session, $_user)
|
2024-07-17 11:47:48 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-07-17 15:45:19 +02:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function saveRemoteUserBySession($_session, $_user, $user)
|
2024-07-17 11:47:48 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-17 15:45:19 +02:00
|
|
|
namespace Federator;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function to initialize plugin
|
|
|
|
*
|
|
|
|
* @param \Federator\Main $main main instance
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function rediscache_load($main)
|
2024-07-17 11:47:48 +02:00
|
|
|
{
|
2024-07-17 15:45:19 +02:00
|
|
|
$rc = new Cache\RedisCache();
|
2024-07-17 11:47:48 +02:00
|
|
|
$main->setCache($rc);
|
|
|
|
}
|