Package pyraf :: Module filecache :: Class FileCache
[hide private]
[frames] | no frames]

Class FileCache

source code


File cache base class

Instance Methods [hide private]
 
__init__(self, filename) source code
 
getValue(self)
Get info associated with file.
source code
 
updateValue(self)
Called when file has changed.
source code
 
newValue(self)
Called when file is new.
source code
 
get(self, update=1)
Get info associated with file.
source code
 
_getFileHandle(self, filename=None)
Get file handle for a filename or filehandle instance
source code
 
_getAttributes(self, filename=None)
Get file attributes for a file or filehandle
source code
 
_warning(self, msg)
Print warning message to stderr, using verbose flag
source code
Method Details [hide private]

getValue(self)

source code 

Get info associated with file.

Usually this is not called directly by the user (use the get() method instead.)

newValue(self)

source code 

Called when file is new. By default same as updateValue.

get(self, update=1)

source code 

Get info associated with file.

Updates cache if needed, then calls getValue. If the update flag is false, simply returns the value without checking to see if it is out-of-date.