public synchronized boolean openCache() {
        
        m_IsCacheOpen = false;
        
        // Open the cache
        if(m_CacheHandler.internalOpenCache()) {
            
            m_CacheHandler.loadCacheInfoFile();
            m_CurrentPageNumber = m_CacheHandler.getStartPage();
            m_StartPage = m_CurrentPageNumber;
            m_CurrentOffset = m_CacheHandler.getStartOffset();
            m_MaxPageSize = m_CacheHandler.getMaxPageSize();
            
            // Reboot the cache if the version number is wrong. 
            if(m_CacheHandler.getVersion() != CACHE_VERSION) {
                
                if(LOG.isError()) {
                    LOG.error("SecondaryCache.openCache()", "REBOOT CACHE saved version= "+m_CacheHandler.getVersion()+
                            " CACHE_VERSION= "+CACHE_VERSION);
                }
                
                m_CacheHandler.rebootCache();                
                m_CurrentPageNumber = 0;
                m_StartPage = 0;
                m_CurrentOffset = 0;   
                
            } else {
                try {
                    // Load the cache index into the memory. 
                    internalLoadCacheIndex();
                }catch (Exception e) {
                    m_CacheHandler.rebootCache();
                    m_IsCacheOpen = false;
                    return false;
                }
            }
            
            // Set the start offset to the current active page file. 
            dout = m_CacheHandler.initStartPage(m_CurrentPageNumber, m_CurrentOffset);
            if(dout == null) {                
                m_CurrentPageNumber = 0;
                m_StartPage = 0;
                m_CurrentOffset = 0;
            }
            
            m_IsCacheOpen = true;
        } else {
            
            if(LOG.isError()) {
                LOG.error("SecondaryCache.openCache()", "Can't open the cache!");
            }
            m_IsCacheOpen = false;
        }
        
        return m_IsCacheOpen;
    }