-
Notifications
You must be signed in to change notification settings - Fork 17
/
todo.txt
45 lines (29 loc) · 1.39 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- Change tuple to a named tuple and remove the INDEX constants.
- The protocol version could be a class attribute as long as it is
retained when serialized.
- Consider adding check for `__memokey__` before `repr`ing arguments.
This would allow for classes to specify their behaviour a little
better.
- Replace Redis lock with pattern from http://redis.io/commands/set
- Should we have a `validator` which runs with knowledge of previous results in
order to validate that they are still good?
- Decorators for setting etagger, validator, maxage determinator, etc.:
@myfunc.set_etagger
def myetagger(...): pass
- Would it be better to overload the names, so that the decorator is
@myfunc.etagger instead of @myfunc.set_etagger, or is that more trouble
than it is worth?
- Rename `etagger` to `etag` with the following symantics:
memo.get(key, func, etag='an etag')
memo.get(key, func, etag=etag_func)
@memo
def myfunc(...): pass
@memo.etag
def myfunc(...): pass
myfunc.etag(*a, **kw) -> etag
- The `etag` attribute on the decorated method will likely need to be
a custom descriptor.
- `namespace`, `region`, `max_age`, `expiry` and `etag` symantics are such that
when it is callable it is called to determine the value, otherwise it is taken
as is. `lock` must always be a lock constructor, and cannot be set to a
specific lock.