#-*-coding: utf-8 -*-
import sys
sys.path.append(".")
sys.path.append("../")
from wrapche import wrapche

from time import sleep
import random

'''
test memory cache
'''

@wrapche('memory', 3)
def need_cache_function(input):
    sleep(2)
    return random.randint(1, 100)

if __name__ == "__main__":
	rst = ''
	for i in range(10):
		sleep(1)
		rst = rst + ', ' + str(need_cache_function(2))
	rst = rst[2:]
	print(rst)
@@ -298,16 +298,45 @@
 %22:%0A%09
-rst = ''
+print('##start test memory cache...')
 %0A%09fo
@@ -370,30 +370,13 @@
 )%0A%09%09
-rst = rst + ', ' + str
+print
 (nee
@@ -401,29 +401,40 @@
 ))%0A%09
-rst = rst%5B2:%5D%0A%09print(rst)
+print('##end test memory cache...')%0A

update test