| 1 |
""" |
| 2 |
flask_caching.backends.null |
| 3 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 4 |
|
| 5 |
The null cache backend. A caching backend that doesn't cache. |
| 6 |
|
| 7 |
:copyright: (c) 2018 by Peter Justin. |
| 8 |
:copyright: (c) 2010 by Thadeus Burgess. |
| 9 |
:license: BSD, see LICENSE for more details. |
| 10 |
""" |
| 11 |
|
| 12 |
from flask_caching.backends.base import BaseCache |
| 13 |
|
| 14 |
|
| 15 |
class NullCache(BaseCache): |
| 16 |
"""A cache that doesn't cache. This can be useful for unit testing. |
| 17 |
|
| 18 |
:param default_timeout: a dummy parameter that is ignored but exists |
| 19 |
for API compatibility with other caches. |
| 20 |
""" |
| 21 |
|
| 22 |
def has(self, key: str) -> bool: |
| 23 |
return False |