Changeset 267

Show
Ignore:
Timestamp:
08/29/06 13:35:21 (2 years ago)
Author:
hans
Message:

Skip disk cache creation and clean/clear actions when operating in shm_only mode. This fixes ticket #165

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r266 r267  
     12006-08-29  Hans Rakers <hans at parse dot nl> 
     2 
     3        * Skip disk cache creation and clean/clear actions when operating in 
     4          shm_only mode. This fixes ticket #165 
     5 
    162006-08-23  Hans Rakers <hans at parse dot nl> 
    27 
  • eaccelerator/trunk/ea_info.c

    r265 r267  
    4646extern eaccelerator_mm *eaccelerator_mm_instance; 
    4747 
     48/* for checking if shm_only storage */ 
     49extern zend_bool eaccelerator_scripts_shm_only; 
     50 
    4851/* {{{ isAdminAllowed(): check if the admin functions are allowed for the calling script */ 
    4952static int isAdminAllowed(TSRMLS_D) { 
     
    283286        } 
    284287 
    285     if (!isAdminAllowed(TSRMLS_C)) { 
    286         zend_error(E_WARNING, NOT_ADMIN_WARNING); 
    287         RETURN_NULL(); 
    288    
     288       if (!isAdminAllowed(TSRMLS_C)) { 
     289               zend_error(E_WARNING, NOT_ADMIN_WARNING); 
     290               RETURN_NULL(); 
     291       
    289292 
    290293        t = time (0); 
     
    294297 
    295298        /* Remove expired keys (session data, content) from disk cache */ 
    296         clean_filecache(EAG(cache_dir), t); 
     299        if(!eaccelerator_scripts_shm_only) { 
     300                clean_filecache(EAG(cache_dir), t); 
     301        } 
    297302 
    298303        /* Remove expired keys (session data, content) from shared memory */ 
     
    348353        EACCELERATOR_PROTECT (); 
    349354 
    350         clear_filecache(EAG(cache_dir)); 
    351          
     355        if(!eaccelerator_scripts_shm_only) { 
     356                clear_filecache(EAG(cache_dir)); 
     357        } 
     358 
    352359    RETURN_NULL(); 
    353360} 
  • eaccelerator/trunk/eaccelerator.c

    r258 r267  
    17221722  ea_debug_init(TSRMLS_C); 
    17231723 
    1724   snprintf(fullpath, MAXPATHLEN-1, "%s/", EAG(cache_dir)); 
    1725   make_hash_dirs(fullpath, EACCELERATOR_HASH_LEVEL); 
     1724  if(!eaccelerator_scripts_shm_only) { 
     1725    snprintf(fullpath, MAXPATHLEN-1, "%s/", EAG(cache_dir)); 
     1726    make_hash_dirs(fullpath, EACCELERATOR_HASH_LEVEL); 
     1727  } 
    17261728 
    17271729  if (type == MODULE_PERSISTENT &&