Package wtf :: Package app :: Package services :: Module memcache :: Class MemcacheService
[hide private]
[frames] | no frames]

Class MemcacheService

source code

object --+
         |
        MemcacheService

Memcache service

This service provides a global memcache access.

Instance Methods [hide private]
 
__init__(self, config, opts, args)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
shutdown(self) source code
 
global_service(self) source code
 
middleware(self, func) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
GlobalMemcache
simple(cls, *spec, **kwargs)
Create simple on-the-fly configured service
source code
Class Variables [hide private]
  __implements__ = [<class 'wtf.services.ServiceInterface'>]
Instance Variables [hide private]
GlobalMemcache _mc
Global memcache service
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, config, opts, args)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

simple(cls, *spec, **kwargs)
Class Method

source code 

Create simple on-the-fly configured service

Recognized keyword args:

max_age
[int] Default max age
prefix
[unicode] Global key prefix
padded
[bool] Padded small values?
timeout
[float] Server timeout
Parameters:
  • spec (tuple) - Memcache servers (('spec', ...))
  • kwargs (dict) - Keyword parameters for memcache config
Returns: GlobalMemcache
The memcache service
Raises:
  • TypeError - Unrecognized keyword args

shutdown(self)

source code 

global_service(self)

source code 

middleware(self, func)

source code