hishel 0.0.26__tar.gz → 0.0.27__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hishel-0.0.26 → hishel-0.0.27}/CHANGELOG.md +4 -0
- {hishel-0.0.26 → hishel-0.0.27}/PKG-INFO +5 -1
- {hishel-0.0.26 → hishel-0.0.27}/hishel/__init__.py +1 -1
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_async/_storages.py +3 -1
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_sync/_storages.py +3 -1
- {hishel-0.0.26 → hishel-0.0.27}/.gitignore +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/LICENSE +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/README.md +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_async/__init__.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_async/_client.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_async/_mock.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_async/_pool.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_async/_transports.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_controller.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_exceptions.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_files.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_headers.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_lfu_cache.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_s3.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_serializers.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_sync/__init__.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_sync/_client.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_sync/_mock.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_sync/_pool.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_sync/_transports.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_synchronization.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/_utils.py +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/hishel/py.typed +0 -0
- {hishel-0.0.26 → hishel-0.0.27}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: hishel
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.27
|
|
4
4
|
Summary: Persistent cache implementation for httpx and httpcore
|
|
5
5
|
Project-URL: Homepage, https://hishel.com
|
|
6
6
|
Project-URL: Source, https://github.com/karpetrosyan/hishel
|
|
@@ -175,6 +175,10 @@ Help us grow and continue developing good software for you ❤️
|
|
|
175
175
|
|
|
176
176
|
# Changelog
|
|
177
177
|
|
|
178
|
+
## 0.0.27 (31th May, 2024)
|
|
179
|
+
|
|
180
|
+
- Fix `RedisStorage` when using without ttl. (#231)
|
|
181
|
+
|
|
178
182
|
## 0.0.26 (12th April, 2024)
|
|
179
183
|
|
|
180
184
|
- Expose `AsyncBaseStorage` and `BaseStorage`. (#220)
|
|
@@ -424,7 +424,9 @@ class AsyncRedisStorage(AsyncBaseStorage):
|
|
|
424
424
|
|
|
425
425
|
ttl_in_milliseconds = await self._client.pttl(key)
|
|
426
426
|
|
|
427
|
-
|
|
427
|
+
# -2: if the key does not exist in Redis
|
|
428
|
+
# -1: if the key exists in Redis but has no expiration
|
|
429
|
+
if ttl_in_milliseconds == -2 or ttl_in_milliseconds == -1: # pragma: no cover
|
|
428
430
|
await self.store(key, response, request, metadata)
|
|
429
431
|
else:
|
|
430
432
|
await self._client.set(
|
|
@@ -424,7 +424,9 @@ class RedisStorage(BaseStorage):
|
|
|
424
424
|
|
|
425
425
|
ttl_in_milliseconds = self._client.pttl(key)
|
|
426
426
|
|
|
427
|
-
|
|
427
|
+
# -2: if the key does not exist in Redis
|
|
428
|
+
# -1: if the key exists in Redis but has no expiration
|
|
429
|
+
if ttl_in_milliseconds == -2 or ttl_in_milliseconds == -1: # pragma: no cover
|
|
428
430
|
self.store(key, response, request, metadata)
|
|
429
431
|
else:
|
|
430
432
|
self._client.set(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|