Skip to content

Commit

Permalink
Some fixes for Sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Feb 20, 2021
1 parent 8fca61f commit 0c07e8d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ python:
path: .
extra_requirements:
- docs
- backends
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Caching behavior can be customized by defining various conditions:
* Specific request parameters
* Custom filter function

See [CacheBackend](https://aiohttp-client-cache.readthedocs.io/en/latest/modules/aiohttp_client_cache.backends.base.html)
See [CacheBackend](https://aiohttp-client-cache.readthedocs.io/en/latest/modules/aiohttp_client_cache.backends.base.html#aiohttp_client_cache.backends.base.CacheBackend)
docs for details.

## Credits
Expand Down
2 changes: 1 addition & 1 deletion aiohttp_client_cache/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class CacheBackend:
"""Base class for cache backends. This manages higher-level cache operations,
including cache expiration, generating cache keys, and managing redirect history.
including cache expiration, generating cache keys, and managing redirect history.
If instantiated directly, ``CacheBackend`` will use a non-persistent in-memory cache.
Expand Down
2 changes: 2 additions & 0 deletions aiohttp_client_cache/backends/dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class DynamoDBBackend(CacheBackend):
See `DynamoDB Service Resource
<https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#service-resource>`_
for more usage details.
See :py:class:`.CacheBackend` for args.
"""

@extend_signature(CacheBackend.__init__)
Expand Down
5 changes: 5 additions & 0 deletions aiohttp_client_cache/backends/gridfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
class GridFSBackend(CacheBackend):
"""An async-compatible interface for caching objects in MongoDB GridFS.
Use this if you need to support documents greater than 16MB.
Args:
connection: Optional client object to use instead of creating a new one
See :py:class:`.CacheBackend` for additional args.
"""

@extend_signature(CacheBackend.__init__)
Expand Down
8 changes: 7 additions & 1 deletion aiohttp_client_cache/backends/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@


class MongoDBBackend(CacheBackend):
"""MongoDB cache backend"""
"""MongoDB cache backend
Args:
connection: Optional client object to use instead of creating a new one
See :py:class:`.CacheBackend` for additional args.
"""

@extend_signature(CacheBackend.__init__)
def __init__(self, cache_name: str = 'http-cache', connection: MongoClient = None, **kwargs):
Expand Down
5 changes: 4 additions & 1 deletion aiohttp_client_cache/backends/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@


class RedisBackend(CacheBackend):
"""Redis cache backend"""
"""Redis cache backend.
See :py:class:`.CacheBackend` for args.
"""

@extend_signature(CacheBackend.__init__)
def __init__(self, cache_name: str = 'http-cache', **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions aiohttp_client_cache/backends/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class SQLiteBackend(CacheBackend):
Args:
cache_name: Database filename
See :py:class:`.CacheBackend` for additional args.
"""

@extend_signature(CacheBackend.__init__)
Expand Down

0 comments on commit 0c07e8d

Please sign in to comment.