File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -83,24 +83,27 @@ describe("firestore", () => {
8383      }  =  require ( "firebase/firestore" ) ;  
8484
8585      // [START initialize_persistence] 
86+       // Memory cache is the default if no config is specified. 
87+       initializeFirestore ( app ) ; 
88+ 
8689      // This is the default behavior if no persistence is specified. 
8790      initializeFirestore ( app ,  { localCache : memoryLocalCache ( ) } ) ; 
8891
89-       // Use IndexedDb  persistence. 
92+       // Defaults to single-tab  persistence if no tab manager is specified . 
9093      initializeFirestore ( app ,  { localCache : persistentLocalCache ( /*settings*/ { } ) } ) ; 
9194
92-       // Use IndexedDb persistence. Defaults to single-tab persistence if no tab  
93-       // manager is specified . 
95+       // Same as `initializeFirestore(app, {localCache: persistentLocalCache(/*settings*/{})})`,  
96+       // but more explicit about tab management . 
9497      initializeFirestore ( app ,  
9598        { localCache : 
9699          persistentLocalCache ( /*settings*/ { tabManager : persistentSingleTabManager ( ) } ) 
97-       } ) ;   // Same as enableIndexedDbPersistence 
100+       } ) ; 
98101
99102      // Use multi-tab IndexedDb persistence. 
100103      initializeFirestore ( app ,  
101104        { localCache : 
102105          persistentLocalCache ( /*settings*/ { tabManager : persistentMultipleTabManager ( ) } ) 
103-         } ) ;   // Same as enableMultiTabIndexedDbPersistence 
106+         } ) ; 
104107      // [END initialize_persistence] 
105108    } ) ; 
106109
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments