teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

2016/09/01 03:50

投稿

Namuto
Namuto

スコア12

title CHANGED
@@ -1,1 +1,1 @@
1
- alkeyについて
1
+ pythonについて
body CHANGED
@@ -1,25 +1,1 @@
1
- キャッシュサーバーの実装を、alkeyというライブラリを使って実装したいと考えております。
2
- そこで以下のソースと英語は一部alkeyライブラリのRead me の抜粋なのですが、
3
- 用語やソースの意味が調べても分からなかったので、質問するに至りました。
4
-
5
- 下のgenerating cache keys・SQLAlchemy model instancesというものがどういうモノなのか
6
- このcache keysがalkeyライブラリの中でどの様な役割を持っているのかさえも分かっておりません。
7
-
8
- どなたか簡単にで良いので、generating cache keys・SQLAlchemy model instancesがどの様なモノで
9
- alkeyライブラリ中でどのな役割を持っているのか簡単に教えて頂けるとありがたいです
1
+ Pythonに詳し人、初めてpythonを触るのですがpythonの特徴ついて教えて頂けるとありがたいです
10
-
11
- →https://github.com/thruflo/alkey
12
- ↑(alkeyライブラリのRead meのurlです。)
13
-
14
- -----------------------------------------------------------------------------------------
15
-
16
- Alkey is a Redis backed tool for generating cache keys that implicitly update / invalidate when SQLAlchemy model instances change, e.g.:
17
-
18
- from alkey.cache import get_cache_key_generator
19
- key_generator = get_cache_key_generator()
20
-
21
- # The `cache_key` will be invalidated when `instance1` or `instance2` change.
22
- cache_key = key_generator(instance1, instance2)
23
- It can be used by any SQLAlchemy application that has access to Redis. Plus it has (optional) integration with the Pyramid framework: config.include the package and generate keys using, e.g.:
24
-
25
- cache_key = request.cache_key(request.context)