Show More
@@ -107,11 +107,11 b' class RhodeCodeCacheRegion(CacheRegion):' | |||||
107 | def get_or_create_for_user_func(key_generator, user_func, *arg, **kw): |
|
107 | def get_or_create_for_user_func(key_generator, user_func, *arg, **kw): | |
108 |
|
108 | |||
109 | if not condition: |
|
109 | if not condition: | |
110 |
log.debug('Calling un-cached |
|
110 | log.debug('Calling un-cached method:%s', user_func.func_name) | |
111 | start = time.time() |
|
111 | start = time.time() | |
112 | result = user_func(*arg, **kw) |
|
112 | result = user_func(*arg, **kw) | |
113 | total = time.time() - start |
|
113 | total = time.time() - start | |
114 |
log.debug('un-cached |
|
114 | log.debug('un-cached method:%s took %.4fs', user_func.func_name, total) | |
115 | return result |
|
115 | return result | |
116 |
|
116 | |||
117 | key = key_generator(*arg, **kw) |
|
117 | key = key_generator(*arg, **kw) | |
@@ -119,7 +119,7 b' class RhodeCodeCacheRegion(CacheRegion):' | |||||
119 | timeout = expiration_time() if expiration_time_is_callable \ |
|
119 | timeout = expiration_time() if expiration_time_is_callable \ | |
120 | else expiration_time |
|
120 | else expiration_time | |
121 |
|
121 | |||
122 |
log.debug('Calling cached |
|
122 | log.debug('Calling cached method:`%s`', user_func.func_name) | |
123 | return self.get_or_create(key, user_func, timeout, should_cache_fn, (arg, kw)) |
|
123 | return self.get_or_create(key, user_func, timeout, should_cache_fn, (arg, kw)) | |
124 |
|
124 | |||
125 | def cache_decorator(user_func): |
|
125 | def cache_decorator(user_func): |
General Comments 0
You need to be logged in to leave comments.
Login now