Name | zencache JSON |
Version |
0.1.4
JSON |
| download |
home_page | |
Summary | Pure memory cache powered by Open RPC. |
upload_time | 2022-12-14 02:00:14 |
maintainer | |
docs_url | None |
author | zencore |
requires_python | |
license | MIT |
keywords |
orpc
rpc
orpcd
zencache
zencached
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# zencache
Pure memory cache powered by orpc.
## Install
```
pip install zencache
```
## Example server config: zencached-config.yml
```
daemon: true
pidfile: zencached.pid
loglevel: INFO
logfile: zencached.log
server:
listen: 0.0.0.0
port: 6779
backlog: 8192
buffer_size: 65536
rfile_buffer_size: 65536
wfile_buffer_size: 65536
max_request_size: 4194304
authentication:
enable: true
users:
app01: spnPF3HzY975GJYC
app02: ZWRVfHrK8QkQoOnQ
app03: xuFTlTy9i6KCfncp
zencache:
ttl-scanner-worker-interval: 60
ttl-scanner-manager-interval: 60
```
## expire options
- NONE: Default option, always set expiry.
- NX: Set expiry only when the key has no expiry.
- XX: Set expiry only when the key has an existing expiry.
- GT: Set expiry only when the new expiry is greater than current one.
- LT: Set expiry only when the new expiry is less than current one.
## Example client usage
```
from orpc_client import OrpcConnectionPool
zencached_client_pool = OrpcConnectionPool(10, kwargs={
"host": "127.0.0.1",
"port": 6779,
"username": "app01",
"password": "spnPF3HzY975GJYC",
"login_event": "zencache.login",
"auto_login": True,
})
with zencached_client_pool.get_session() as session:
session.zencache.set('a', 'a')
assert session.zencache.get('a') == 'a'
```
## Releases
### v0.1.4
- Force to upgrade orpc version.
- Doc update.
### v0.1.3
- Add gevent patch all.
- Force item key to str format.
### v0.1.0
- First release.
Raw data
{
"_id": null,
"home_page": "",
"name": "zencache",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "orpc,rpc,orpcd,zencache,zencached",
"author": "zencore",
"author_email": "dobetter@zencore.cn",
"download_url": "https://files.pythonhosted.org/packages/78/85/852be803697dc70a63ff4647c5233a12621173da76e5d7f2d4f7f9079abb/zencache-0.1.4.tar.gz",
"platform": null,
"description": "# zencache\n\nPure memory cache powered by orpc.\n\n## Install\n\n```\npip install zencache\n```\n\n## Example server config: zencached-config.yml\n\n```\ndaemon: true\npidfile: zencached.pid\nloglevel: INFO\nlogfile: zencached.log\nserver:\n listen: 0.0.0.0\n port: 6779\n backlog: 8192\n buffer_size: 65536\n rfile_buffer_size: 65536\n wfile_buffer_size: 65536\n max_request_size: 4194304\nauthentication:\n enable: true\n users:\n app01: spnPF3HzY975GJYC\n app02: ZWRVfHrK8QkQoOnQ\n app03: xuFTlTy9i6KCfncp\nzencache:\n ttl-scanner-worker-interval: 60\n ttl-scanner-manager-interval: 60\n```\n\n## expire options\n\n- NONE: Default option, always set expiry.\n- NX: Set expiry only when the key has no expiry.\n- XX: Set expiry only when the key has an existing expiry.\n- GT: Set expiry only when the new expiry is greater than current one.\n- LT: Set expiry only when the new expiry is less than current one.\n\n## Example client usage\n\n```\nfrom orpc_client import OrpcConnectionPool\n\nzencached_client_pool = OrpcConnectionPool(10, kwargs={\n \"host\": \"127.0.0.1\",\n \"port\": 6779,\n \"username\": \"app01\",\n \"password\": \"spnPF3HzY975GJYC\",\n \"login_event\": \"zencache.login\",\n \"auto_login\": True,\n })\n\nwith zencached_client_pool.get_session() as session:\n session.zencache.set('a', 'a')\n assert session.zencache.get('a') == 'a'\n```\n\n## Releases\n\n### v0.1.4\n\n- Force to upgrade orpc version.\n- Doc update.\n\n### v0.1.3\n\n- Add gevent patch all.\n- Force item key to str format.\n\n### v0.1.0\n\n- First release.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Pure memory cache powered by Open RPC.",
"version": "0.1.4",
"split_keywords": [
"orpc",
"rpc",
"orpcd",
"zencache",
"zencached"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "0a6d9a2da6f712cd836b48304b501f16",
"sha256": "3132352cccfd9faaa686e68d05ba03ab3b9860cbea382b7d35141599355973a5"
},
"downloads": -1,
"filename": "zencache-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0a6d9a2da6f712cd836b48304b501f16",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6108,
"upload_time": "2022-12-14T02:00:13",
"upload_time_iso_8601": "2022-12-14T02:00:13.385475Z",
"url": "https://files.pythonhosted.org/packages/26/d2/c9667ca5e4aa726141df6f0a65db3361f38d690f8952130c8801dcde653f/zencache-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "52810fbeda3eb252a71df37d9b1c667f",
"sha256": "8d738c5ffa2a9ef7385968a512a24745b7ed6885c6450e87a66b8965cb1213d5"
},
"downloads": -1,
"filename": "zencache-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "52810fbeda3eb252a71df37d9b1c667f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6527,
"upload_time": "2022-12-14T02:00:14",
"upload_time_iso_8601": "2022-12-14T02:00:14.859822Z",
"url": "https://files.pythonhosted.org/packages/78/85/852be803697dc70a63ff4647c5233a12621173da76e5d7f2d4f7f9079abb/zencache-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-14 02:00:14",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "zencache"
}