質問編集履歴

1

2016/09/01 03:50

投稿

Namuto
Namuto

スコア12

test CHANGED
@@ -1 +1 @@
1
- alkeyについて
1
+ pythonについて
test CHANGED
@@ -1,49 +1 @@
1
- キャッシュサーバーの実装を、alkeyというライブラリを使って実装したいと考えております。
2
-
3
- そこで以下のソースと英語は一部alkeyライブラリのRead me の抜粋なのですが、
4
-
5
- 用語やソースの意味が調べても分からなかったので、質問するに至りました。
6
-
7
-
8
-
9
- 下のgenerating cache keys・SQLAlchemy model instancesというものがどういうモノなのか
10
-
11
- このcache keysがalkeyライブラリの中でどの様な役割を持っているのかさえも分かっておりません。
12
-
13
-
14
-
15
- どなたか簡単にで良いので、generating cache keys・SQLAlchemy model instancesがどの様なモノで
16
-
17
- alkeyライブラリ中でどのな役割持っているのか簡単に教えて頂けるとありがたいです
1
+ Pythonに詳しい人、初めてpythonるのですがpythonの特徴ついて教えて頂けるとありがたいです
18
-
19
-
20
-
21
- →https://github.com/thruflo/alkey
22
-
23
- ↑(alkeyライブラリのRead meのurlです。)
24
-
25
-
26
-
27
- -----------------------------------------------------------------------------------------
28
-
29
-
30
-
31
- Alkey is a Redis backed tool for generating cache keys that implicitly update / invalidate when SQLAlchemy model instances change, e.g.:
32
-
33
-
34
-
35
- from alkey.cache import get_cache_key_generator
36
-
37
- key_generator = get_cache_key_generator()
38
-
39
-
40
-
41
- # The `cache_key` will be invalidated when `instance1` or `instance2` change.
42
-
43
- cache_key = key_generator(instance1, instance2)
44
-
45
- 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.:
46
-
47
-
48
-
49
- cache_key = request.cache_key(request.context)