Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f0e0f200
Kaydet (Commit)
f0e0f200
authored
Kas 26, 2018
tarafından
Raymond Hettinger
Kaydeden (comit)
Miss Islington (bot)
Kas 26, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-35300: Add usage note to the lru_cache() docs (GH-10707)
https://bugs.python.org/issue35300
üst
ec13b932
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
functools.rst
Doc/library/functools.rst
+5
-0
No files found.
Doc/library/functools.rst
Dosyayı görüntüle @
f0e0f200
...
@@ -118,6 +118,11 @@ The :mod:`functools` module defines the following functions:
...
@@ -118,6 +118,11 @@ The :mod:`functools` module defines the following functions:
The cache's size limit assures that the cache does not grow without bound on
The cache's size limit assures that the cache does not grow without bound on
long-running processes such as web servers.
long-running processes such as web servers.
In general, the LRU cache should only be used when you want to reuse
previously computed values. Accordingly, it doesn't make sense to cache
functions with side-effects, functions that need to create distinct mutable
objects on each call, or impure functions such as time() or random().
Example of an LRU cache for static web content::
Example of an LRU cache for static web content::
@lru_cache(maxsize=32)
@lru_cache(maxsize=32)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment