VuFind API Documentation

CredisStorage
in package
implements StorageInterface

Credis storage adapter for Rate Limiter.

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Page

Interfaces, Classes, Traits and Enums

StorageInterface

Table of Contents

$config  : array<string|int, mixed>
$namespace  : string
Cache namespace
$redis  : Credis_Client
$redisVersion  : int
Redis version
__construct()  : mixed
Constructor
delete()  : void
Delete limiter state by ID
fetch()  : LimiterStateInterface|null
Get limiter state by ID
save()  : void
Save limiter state
createRedisKey()  : string
Create a Redis key from a Limiter state ID

Properties

Methods

__construct()

Constructor

public __construct(Credis_Client $redis[, array<string|int, mixed> $config = [] ]) : mixed
Parameters
$redis : Credis_Client

Redis connection object

$config : array<string|int, mixed> = []

Redis configuration config.ini)

Return values
mixed

delete()

Delete limiter state by ID

public delete(string $limiterStateId) : void
Parameters
$limiterStateId : string

Limiter state ID

Return values
void

fetch()

Get limiter state by ID

public fetch(string $limiterStateId) : LimiterStateInterface|null
Parameters
$limiterStateId : string

Limiter state ID

Return values
LimiterStateInterface|null

save()

Save limiter state

public save(LimiterStateInterface $limiterState) : void
Parameters
$limiterState : LimiterStateInterface

Limiter state

Return values
void

createRedisKey()

Create a Redis key from a Limiter state ID

protected createRedisKey(string $id) : string
Parameters
$id : string

Limiter state ID

Return values
string

Search results