Skip to content

Commit e6fd84e

Browse files
author
Emanuele Palazzetti
committed
flask-cache: provide docs output
1 parent db7ea39 commit e6fd84e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

ddtrace/contrib/flask_cache/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
The flask cache tracer will track any access to a cache backend.
3-
You can this tracer together with the Flask tracer middleware.
3+
You can use this tracer together with the Flask tracer middleware.
44
55
To install the tracer, do the following::
66
@@ -12,14 +12,15 @@
1212
app = Flask(__name__)
1313
1414
# get the traced Cache class
15-
Cache = get_traced_cache(tracer, service='flask-cache-experiments')
15+
Cache = get_traced_cache(tracer, service='my-flask-cache-app')
1616
17-
# use the Cache as usual
17+
# use the Cache as usual with your preferred CACHE_TYPE
1818
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
1919
2020
def counter():
2121
# this access is traced
2222
conn_counter = cache.get("conn_counter")
23+
2324
"""
2425

2526
from ..util import require_modules

docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ Flask
117117

118118
.. automodule:: ddtrace.contrib.flask
119119

120+
Flask-cache
121+
~~~~~~~~~~~
122+
123+
.. automodule:: ddtrace.contrib.flask_cache
124+
120125
Mongoengine
121126
~~~~~~~~~~~
122127

0 commit comments

Comments
 (0)