We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34eaece commit 6242607Copy full SHA for 6242607
2 files changed
sunlight/__init__.py
@@ -69,4 +69,4 @@ def _attempt_to_load_apikey():
69
_attempt_to_load_apikey()
70
71
72
-cache = sunlight.cache.response_cache
+response_cache = sunlight.cache.response_cache
sunlight/cache.py
@@ -1,11 +1,12 @@
1
'''
2
-The cache is disabled by default. Use it like so:
+.. module:: cache
3
4
-import logging
5
-from sunlight import cache
+The cache is disabled by default. Use it like so: ::
6
7
-cache.enable('mongo')
8
-cache.logger.setLevel(logging.DEBUG)
+ import logging
+ from sunlight import response_cache
+ response_cache.enable('mongo')
9
+ response_cache.logger.setLevel(logging.DEBUG)
10
11
Note: the implementation below doesn't bother with cache expiration.
12
Typical use case is caching API calls during an expensive build process.
0 commit comments