module/mc.py
module.mc
MC
MC
Memcached cache
Source code in module/mc.py
| class MC: # pylint: disable=too-few-public-methods
''' Memcached cache '''
@staticmethod
def get_client() -> Client:
''' Get client
- `binary`: `True`.
- `behaviors`:
- `tcp_nodelay`: `True`
- `ketama`: `True`
Returns:
[pylibmc.Client][]
'''
return pylibmc.Client(setting.MC_SERVERS,
binary=True,
behaviors={'tcp_nodelay': True, 'ketama': True})
|
get_client
staticmethod
Get client
binary
: True
.
behaviors
:
tcp_nodelay
: True
ketama
: True
Returns:
Source code in module/mc.py
| @staticmethod
def get_client() -> Client:
''' Get client
- `binary`: `True`.
- `behaviors`:
- `tcp_nodelay`: `True`
- `ketama`: `True`
Returns:
[pylibmc.Client][]
'''
return pylibmc.Client(setting.MC_SERVERS,
binary=True,
behaviors={'tcp_nodelay': True, 'ketama': True})
|
Last update:
June 12, 2022