[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/cache/bloom/ -> BloomCacheRedis.php (summary)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Author: Aaron Schulz
File Size: 370 lines (10 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

BloomCacheRedis:: (11 methods):
  __construct()
  doInit()
  doAdd()
  doSetStatus()
  doGetStatus()
  doIsHit()
  doDelete()
  getScopedLock()
  getSegment()
  getConnection()
  handleException()


Class: BloomCacheRedis  - X-Ref

Bloom filter implemented using Redis

The Redis server must be >= 2.6 and should have volatile-lru or volatile-ttl
if there is any eviction policy. It should not be allkeys-* in any case. Also,
this can be used in a simple master/slave setup or with Redis Sentinel preferably.

Some bits are based on https://github.com/ErikDubbelboer/redis-lua-scaling-bloom-filter
but are simplified to use a single filter instead of up to 32 filters.

__construct( array $config )   X-Ref

param: array $config

doInit( $key, $size, $precision )   X-Ref
No description

doAdd( $key, array $members )   X-Ref
No description

doSetStatus( $virtualKey, array $values )   X-Ref
No description

doGetStatus( $virtualKey )   X-Ref
No description

doIsHit( $key, $member )   X-Ref
No description

doDelete( $key )   X-Ref
No description

getScopedLock( $virtualKey )   X-Ref
No description

getSegment( $member )   X-Ref

param: string $member
return: integer

getConnection( $to )   X-Ref
$param string $to (master/slave)

return: RedisConnRef|bool Returns false on failure

handleException( RedisConnRef $conn, $e )   X-Ref

param: RedisConnRef $conn
param: Exception $e



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1