Overview

Namespaces

  • bandwidthThrottle
    • tokenBucket
      • storage
        • scope

Classes

  • FileStorage
  • IPCStorage
  • MemcachedStorage
  • MemcacheStorage
  • PDOStorage
  • PHPRedisStorage
  • PredisStorage
  • SessionStorage
  • SingleProcessStorage

Interfaces

  • Storage

Exceptions

  • StorageException
  • Overview
  • Namespace
  • Class

Class MemcacheStorage

Memcache based storage which can be shared among processes.

This storage is in the global scope.

bandwidthThrottle\tokenBucket\storage\MemcacheStorage implements bandwidthThrottle\tokenBucket\storage\Storage, bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
Final
Namespace: bandwidthThrottle\tokenBucket\storage
Deprecated:

1.0.0 There's no support for the memcache extension under PHP-7. Consider using ext-mecached and bandwidthThrottle\tokenBucket\storage\MemcachedStorage. This storage will not be removed, however there's no guarantee that it will work. As soon as ext-memcache is available for PHP-7 the deprecation will be reverted.


License: WTFPL
Author: Markus Malkusch markus@malkusch.de
Link: Donations
Located at storage/MemcacheStorage.php
Methods summary
public
# __construct( string $name, Memcache $memcache )

Sets the connected memcache API and the token bucket name.

Sets the connected memcache API and the token bucket name.

The api needs to be connected already. I.e. Memcache::connect() was already called.

Parameters

$name
The name of the shared token bucket.
$memcache
The connected memcache API.
API documentation generated by ApiGen