summaryrefslogtreecommitdiff
path: root/t.py
blob: 8e6921c857aa39111151802439a9c0f821f7631d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)