diff options
Diffstat (limited to 't.py')
-rw-r--r-- | t.py | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +# mycache = ReqCache("test", "memory") +import requests +s = requests.session() + +r = s.get('http://github.com') +print r.__dict__.get('from_cache') + +r = s.get('http://github.com') +print r.__dict__.get('from_cache') + + +r = s.get('http://github.com') +print r.__dict__.get('from_cache') + +r = s.get('http://github.com') +print r.__dict__.get('from_cache') + +r = s.get('http://github.com') +print r.__dict__.get('from_cache') + +r = s.get('http://github.com') +print r.__dict__.get('from_cache') +# r = requests.get('http://github.com', hooks=mycache.hooks) + +# r = requests.get('http://github.com', hooks=mycache.hooks) +# explain_cache_result(r) |