[Patches] [ python-Patches-405139 ] Add reset() method to dircache

nobody nobody@sourceforge.net
Fri, 02 Mar 2001 05:37:56 -0800


Patches #405139, was updated on 2001-03-01 07:20
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=405139&group_id=5470

Category: library
Group: None
Status: Closed
Priority: 5
Submitted By: Itamar S.T.
Assigned to: Guido van Rossum
Summary: Add reset() method to dircache

Initial Comment:
The statcache module has a method reset() that resets
the cache. The dircache module does not. This simple
patch (basically a copy/paste from statcache) adds a
reset() method to the dircache module.

----------------------------------------------------------------------

Comment By: Guido van Rossum
Date: 2001-03-02 05:37

Message:
Logged In: YES 
user_id=6380

Thanks -- applied now (with an added entry to __all__ for
good measure).

----------------------------------------------------------------------

Comment By: Itamar S.T.
Date: 2001-03-02 03:51

Message:
Logged In: YES 
user_id=32065

Wonderful, sourceforge is rejecting all my patches this 
week. Hope it at least preserves linebreaks in comments...


*** dircache.py.orig    Thu Mar  1 17:14:51 2001
--- dircache.py Thu Mar  1 17:15:37 2001
***************
*** 8,13 ****
--- 8,18 ----

  cache = {}

+ def reset():
+       """Reset the cache completely."""
+       global cache
+       cache = {}
+
  def listdir(path):
      """List directory contents, using cache."""
      try:


----------------------------------------------------------------------

Comment By: Guido van Rossum
Date: 2001-03-01 22:59

Message:
Logged In: YES 
user_id=6380

Can you upload the patch or cut and paste it in?
SourceForge seems to have lost it (stupid SF bug!).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=405139&group_id=5470