summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook.git@proton.me>2023-03-01 15:24:06 -0600
committerJordan Cook <jordan.cook.git@proton.me>2023-03-01 17:35:24 -0600
commit9728ee48c026866f18126cee68bb05fd6db2aab0 (patch)
tree41e73183786cef6ccffd993d8279f0c7de87664d
parent4ceda12dba80865b1efd2318daf040fe24a41ab3 (diff)
downloadrequests-cache-9728ee48c026866f18126cee68bb05fd6db2aab0.tar.gz
Fix typos
-rw-r--r--README.md10
-rw-r--r--docs/user_guide/expiration.md2
-rw-r--r--requests_cache/backends/sqlite.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/README.md b/README.md
index bec03fe..3271d64 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@ use one of the two following strategies to balance cache freshness and performan
**Define exactly how long to keep responses:**
-Use the `expire_after` parameter to set a fixed expiration time for all responses.
+Use the `expire_after` parameter to set a fixed expiration time for all responses:
```python
from requests_cache import CachedSession
from datetime import timedelta
@@ -101,7 +101,7 @@ from datetime import timedelta
# Keep responses for 360 seconds
session = CachedSession('demo_cache', expire_after=360)
-# Use timedelta objects for more precise control
+# Or use timedelta objects to specify other units of time
session = CachedSession('demo_cache', expire_after=timedelta(hours=1))
```
See [Expiration](https://requests-cache.readthedocs.io/en/stable/user_guide/expiration.html) for
@@ -110,14 +110,14 @@ more features and settings.
**Use Cache-Control headers:**
Use the `cache_control` parameter to enable automatic expiration based on `Cache-Control` and other
-standard HTTP headers sent by the server.
+standard HTTP headers sent by the server:
```python
from requests_cache import CachedSession
session = CachedSession('demo_cache', cache_control=True)
```
-See [Headers](https://requests-cache.readthedocs.io/en/stable/user_guide/headers.html) for more
-details.
+See [Cache Headers](https://requests-cache.readthedocs.io/en/stable/user_guide/headers.html)
+for more details.
### Settings
diff --git a/docs/user_guide/expiration.md b/docs/user_guide/expiration.md
index 4c9fc88..d4b2fa5 100644
--- a/docs/user_guide/expiration.md
+++ b/docs/user_guide/expiration.md
@@ -20,7 +20,7 @@ request, the following order of precedence is used:
2. Cache-Control request headers
3. Per-request expiration (`expire_after` argument for {py:meth}`.CachedSession.request`)
4. Per-URL expiration (`urls_expire_after` argument for {py:class}`.CachedSession`)
-5. Per-session expiration (`expire_after` argument for {py:class}`.CacheBackend`)
+5. Per-session expiration (`expire_after` argument for {py:class}`.CachedSession`)
## Expiration Values
`expire_after` can be any of the following time values:
diff --git a/requests_cache/backends/sqlite.py b/requests_cache/backends/sqlite.py
index 2b03d4a..72b62da 100644
--- a/requests_cache/backends/sqlite.py
+++ b/requests_cache/backends/sqlite.py
@@ -99,7 +99,7 @@ class SQLiteCache(BaseCache):
self.redirects.vacuum()
def _delete_expired(self):
- """A more efficient implementation deleting expired responses in SQL"""
+ """A more efficient implementation of deleting expired responses in SQL"""
with self.responses.connection(commit=True) as con:
con.execute(
f'DELETE FROM {self.responses.table_name} WHERE expires <= ?', (round(time()),)