Changeset 377 for branches/1.2


Ignore:
Timestamp:
2007-05-05T13:09:28+02:00 (8 years ago)
Author:
moo
Message:

merged [374] [375] from trunk->1.2: misses/hits was not updated for var cache

Location:
branches/1.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2

  • branches/1.2/NEWS

    r373 r377  
    77== ChangeLog == 
    88 * #86: remove/edit variable in admin page 
     9 * fixed #77: hits/misses was not updated 
    910 * fixed #56: xcache_set segfaults when xcache.var_size=0 
    1011  
  • branches/1.2/xcache.c

    r368 r377  
    17681768    xc_entry_data_var_t var; 
    17691769    zval *name; 
     1770    int found = 0; 
    17701771 
    17711772    if (!xc_var_caches) { 
     
    17841785        if (stored_xce) { 
    17851786            if (!VAR_ENTRY_EXPIRED(stored_xce)) { 
     1787                found = 1; 
    17861788                xc_processor_restore_zval(return_value, stored_xce->data.var->value, stored_xce->have_references TSRMLS_CC); 
    17871789                /* return */ 
     
    17951797        RETVAL_NULL(); 
    17961798    } LEAVE_LOCK(xce.cache); 
     1799    if (found) { 
     1800        xce.cache->hits ++; 
     1801    } 
     1802    else { 
     1803        xce.cache->misses ++; 
     1804    } 
    17971805} 
    17981806/* }}} */ 
     
    18411849    xc_entry_data_var_t var; 
    18421850    zval *name; 
     1851    int found = 0; 
    18431852 
    18441853    if (!xc_var_caches) { 
     
    18571866        if (stored_xce) { 
    18581867            if (!VAR_ENTRY_EXPIRED(stored_xce)) { 
     1868                found = 1; 
    18591869                RETVAL_TRUE; 
    18601870                /* return */ 
     
    18681878        RETVAL_FALSE; 
    18691879    } LEAVE_LOCK(xce.cache); 
     1880    if (found) { 
     1881        xce.cache->hits ++; 
     1882    } 
     1883    else { 
     1884        xce.cache->misses ++; 
     1885    } 
    18701886} 
    18711887/* }}} */ 
Note: See TracChangeset for help on using the changeset viewer.