summaryrefslogtreecommitdiff
path: root/t.py
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2012-10-16 13:39:00 -0700
committerKenneth Reitz <me@kennethreitz.com>2012-10-16 13:39:00 -0700
commite3c51e4182c54ffc494a7327e69004342844b0a4 (patch)
tree6f8a68415b5adc4109cd63b56d134e48535288b3 /t.py
parent706f88fedd7c526bc17ec9341a75ace1486d0a60 (diff)
downloadpython-requests-cache.tar.gz
brain dumpcache
Diffstat (limited to 't.py')
-rw-r--r--t.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/t.py b/t.py
new file mode 100644
index 00000000..8e6921c8
--- /dev/null
+++ b/t.py
@@ -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)