diff options
author | Kenneth Reitz <me@kennethreitz.com> | 2012-10-16 13:39:00 -0700 |
---|---|---|
committer | Kenneth Reitz <me@kennethreitz.com> | 2012-10-16 13:39:00 -0700 |
commit | e3c51e4182c54ffc494a7327e69004342844b0a4 (patch) | |
tree | 6f8a68415b5adc4109cd63b56d134e48535288b3 /t.py | |
parent | 706f88fedd7c526bc17ec9341a75ace1486d0a60 (diff) | |
download | python-requests-cache.tar.gz |
brain dumpcache
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) |