Kekik 1.6.5__py3-none-any.whl → 1.6.7__py3-none-any.whl
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.
- Kekik/cache.py +7 -9
- {Kekik-1.6.5.dist-info → Kekik-1.6.7.dist-info}/METADATA +1 -1
- {Kekik-1.6.5.dist-info → Kekik-1.6.7.dist-info}/RECORD +7 -7
- {Kekik-1.6.5.dist-info → Kekik-1.6.7.dist-info}/LICENSE +0 -0
- {Kekik-1.6.5.dist-info → Kekik-1.6.7.dist-info}/WHEEL +0 -0
- {Kekik-1.6.5.dist-info → Kekik-1.6.7.dist-info}/entry_points.txt +0 -0
- {Kekik-1.6.5.dist-info → Kekik-1.6.7.dist-info}/top_level.txt +0 -0
Kekik/cache.py
CHANGED
|
@@ -59,14 +59,12 @@ class AsyncCache(Cache):
|
|
|
59
59
|
super().__init__(ttl)
|
|
60
60
|
self.futures = {}
|
|
61
61
|
|
|
62
|
-
if ttl is not UNLIMITED
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
self.
|
|
68
|
-
|
|
69
|
-
self._cleanup_task = asyncio.create_task(self._auto_cleanup())
|
|
62
|
+
self._cleanup_interval = max(ttl, cleanup_interval) if ttl is not UNLIMITED else cleanup_interval
|
|
63
|
+
# Aktif bir event loop varsa otomatik temizlik görevini başlatıyoruz.
|
|
64
|
+
try:
|
|
65
|
+
self._cleanup_task = asyncio.get_running_loop().create_task(self._auto_cleanup())
|
|
66
|
+
except RuntimeError:
|
|
67
|
+
self._cleanup_task = None
|
|
70
68
|
|
|
71
69
|
async def _auto_cleanup(self):
|
|
72
70
|
"""Belirlenen aralıklarla cache içerisindeki süresi dolmuş entry'leri temizler."""
|
|
@@ -134,7 +132,7 @@ async def _async_compute_and_cache(func, key, unless, *args, **kwargs):
|
|
|
134
132
|
|
|
135
133
|
# unless koşuluna göre cache'e ekleme yap.
|
|
136
134
|
if unless is None or not unless(result):
|
|
137
|
-
|
|
135
|
+
cache[key] = result
|
|
138
136
|
|
|
139
137
|
return result
|
|
140
138
|
except Exception as exc:
|
|
@@ -2,7 +2,7 @@ Kekik/BIST.py,sha256=gFvEFdLGgsxUq33AkqOr5pVGsSm9jR0v6DVwoSzhX7w,1375
|
|
|
2
2
|
Kekik/Domain2IP.py,sha256=dMDatPElTMfLORzC_QN9znex8Se1eid3EPsxAe5S1aQ,4851
|
|
3
3
|
Kekik/Nesne.py,sha256=33pp49cZkRCoa0aUFfzVMpx5FSJchSdiKhm97Nkol1Q,7020
|
|
4
4
|
Kekik/__init__.py,sha256=Iy-O4c_DuY2ttQJv6j7xoVk3IS9EcC0Aqx3vhFvCgd8,1057
|
|
5
|
-
Kekik/cache.py,sha256=
|
|
5
|
+
Kekik/cache.py,sha256=YrlSJBIaFeI6syURQhkF4M8tv6zr72zny-lnazA2VoI,7858
|
|
6
6
|
Kekik/cli.py,sha256=I--MV8-okBSUYAaV4fRsMeB2n57OJITrgbEnK1OdTPY,3648
|
|
7
7
|
Kekik/csv2dict.py,sha256=HO0AgREXE0yM7cL4OwqpkCGm2pz31RTb0mhnTg6gdwo,423
|
|
8
8
|
Kekik/dict2csv.py,sha256=AcGvEg9i5MXtwMwg7WiDxOj8h9LldNjjcRiWFwA9XJU,560
|
|
@@ -34,9 +34,9 @@ Kekik/kisi_ver/__init__.py,sha256=gH613YZC3ziE7f67dViefRSuwDwsHyVvXHpM5CzZ2q4,13
|
|
|
34
34
|
Kekik/kisi_ver/biyografiler.py,sha256=5Xv1ixaDGHGtl5Nf92jo9dPgF3jDXOGEPmWgoEsn9j8,189486
|
|
35
35
|
Kekik/kisi_ver/isimler.py,sha256=zHVimWL_4TvoLE3qzWQslDBc8-IJZSB02s0vRwsVM1g,88066
|
|
36
36
|
Kekik/kisi_ver/soyisimler.py,sha256=YQJYp2SjENgwOaCa9mmShxPYeeUll2cq8Vox-d8_kB8,78485
|
|
37
|
-
Kekik-1.6.
|
|
38
|
-
Kekik-1.6.
|
|
39
|
-
Kekik-1.6.
|
|
40
|
-
Kekik-1.6.
|
|
41
|
-
Kekik-1.6.
|
|
42
|
-
Kekik-1.6.
|
|
37
|
+
Kekik-1.6.7.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
38
|
+
Kekik-1.6.7.dist-info/METADATA,sha256=JLbEAry2cH-qyFJ6Uc5i2-RPC4HI_aO6CYPivbvvhwM,43959
|
|
39
|
+
Kekik-1.6.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
40
|
+
Kekik-1.6.7.dist-info/entry_points.txt,sha256=yjBifxtRlqfg8lPkH4Bu-urSa5ecptCHsuth-DcyWcg,59
|
|
41
|
+
Kekik-1.6.7.dist-info/top_level.txt,sha256=NotddscfgxawvuRyAa7xkgnMhyteFDcBxb5aU5GY3BM,6
|
|
42
|
+
Kekik-1.6.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|