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
1d542f24
Kaydet (Commit)
1d542f24
authored
Ara 05, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove the deprecated statcache module.
üst
3489cad3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
61 deletions
+0
-61
lib.tex
Doc/lib/lib.tex
+0
-1
libstatcache.tex
Doc/lib/libstatcache.tex
+0
-60
No files found.
Doc/lib/lib.tex
Dosyayı görüntüle @
1d542f24
...
...
@@ -141,7 +141,6 @@ and how to embed it in other applications.
\input
{
libposixpath
}
% os.path
\input
{
libdircache
}
\input
{
libstat
}
\input
{
libstatcache
}
\input
{
libstatvfs
}
\input
{
libfilecmp
}
\input
{
libsubprocess
}
...
...
Doc/lib/libstatcache.tex
deleted
100644 → 0
Dosyayı görüntüle @
3489cad3
\section
{
\module
{
statcache
}
---
An optimization of
\function
{
os.stat()
}}
\declaremodule
{
standard
}{
statcache
}
\sectionauthor
{
Moshe Zadka
}{
moshez@zadka.site.co.il
}
\modulesynopsis
{
Stat files, and remember results.
}
\deprecated
{
2.2
}{
Use
\function
{
\refmodule
{
os
}
.stat()
}
directly instead
of using the cache; the cache introduces a very high level of
fragility in applications using it and complicates application code
with the addition of cache management support.
}
The
\module
{
statcache
}
module provides a simple optimization to
\function
{
os.stat()
}
: remembering the values of previous invocations.
The
\module
{
statcache
}
module defines the following functions:
\begin{funcdesc}
{
stat
}{
path
}
This is the main module entry-point.
Identical for
\function
{
os.stat()
}
, except for remembering the result
for future invocations of the function.
\end{funcdesc}
The rest of the functions are used to clear the cache, or parts of
it.
\begin{funcdesc}
{
reset
}{}
Clear the cache: forget all results of previous
\function
{
stat()
}
calls.
\end{funcdesc}
\begin{funcdesc}
{
forget
}{
path
}
Forget the result of
\code
{
stat(
\var
{
path
}
)
}
, if any.
\end{funcdesc}
\begin{funcdesc}
{
forget
_
prefix
}{
prefix
}
Forget all results of
\code
{
stat(
\var
{
path
}
)
}
for
\var
{
path
}
starting
with
\var
{
prefix
}
.
\end{funcdesc}
\begin{funcdesc}
{
forget
_
dir
}{
prefix
}
Forget all results of
\code
{
stat(
\var
{
path
}
)
}
for
\var
{
path
}
a file in
the directory
\var
{
prefix
}
, including
\code
{
stat(
\var
{
prefix
}
)
}
.
\end{funcdesc}
\begin{funcdesc}
{
forget
_
except
_
prefix
}{
prefix
}
Similar to
\function
{
forget
_
prefix()
}
, but for all
\var
{
path
}
values
\emph
{
not
}
starting with
\var
{
prefix
}
.
\end{funcdesc}
Example:
\begin{verbatim}
>>> import os, statcache
>>> statcache.stat('.')
(16893, 2049, 772, 18, 1000, 1000, 2048, 929609777, 929609777, 929609777)
>>> os.stat('.')
(16893, 2049, 772, 18, 1000, 1000, 2048, 929609777, 929609777, 929609777)
\end{verbatim}
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