Ignore:
Timestamp:
31/03/08 14:52:45 (12 years ago)
Author:
domlowe
Message:

Added Ag's file cache code to DataInterface?. The Data Interface is read only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/csmllibs/csmldataiface.py

    r3627 r3704  
    1212************************************************************************************** 
    1313''' 
     14 
     15#caching module: 
     16from open_file_cache import OpenFileCache  
    1417 
    1518import pdb 
     
    4649    pass 
    4750 
     51cache=OpenFileCache() 
     52cache.limit=1000 
    4853 
    4954class DataInterface(object): 
     
    383388        ''' open file''' 
    384389        self._filename=filename 
    385         self.file=cdms.open(filename) 
    386          
     390        self.file=cache.openFile(cdms.open,filename) 
    387391        #now we have the file name can properly determine extractType/Prefix 
    388392        fileExtension = str(filename)[-3:] 
     
    402406            self.extractType = 'NetCDFExtract'  #okay this isn't true, but ok for testing 
    403407            self.extractPrefix = '_ncextract__'  
     408     
     409    def closeFile(self): 
     410        pass #let the cache manage this 
    404411     
    405412    def getListOfAxes(self): 
Note: See TracChangeset for help on using the changeset viewer.