57 lines
		
	
	
	
		
			965 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
	
		
			965 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * connection handle
 | 
						|
     *
 | 
						|
     * @var \Redis $redis
 | 
						|
     */
 | 
						|
    private $redis;
 | 
						|
 | 
						|
    /**
 | 
						|
     * constructor
 | 
						|
     */
 | 
						|
    public function __construct()
 | 
						|
    {
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * {@inheritDoc}
 | 
						|
     */
 | 
						|
    public function getRemoteUserBySession($_session, $_user)
 | 
						|
    {
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * {@inheritDoc}
 | 
						|
     */
 | 
						|
    public function saveRemoteUserBySession($_session, $_user, $user)
 | 
						|
    {
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
namespace Federator;
 | 
						|
 | 
						|
/**
 | 
						|
 * Function to initialize plugin
 | 
						|
 *
 | 
						|
 * @param  \Federator\Main $main main instance
 | 
						|
 * @return void
 | 
						|
 */
 | 
						|
function rediscache_load($main)
 | 
						|
{
 | 
						|
    $rc = new Cache\RedisCache();
 | 
						|
    $main->setCache($rc);
 | 
						|
}
 |