Mantis - Quercus
Viewing Issue Advanced Details
2833 minor always 08-08-08 15:31 08-11-08 09:42
koreth  
ferg  
normal  
closed 3.2.0  
fixed  
none    
none 3.2.1  
0002833: apc_cache_info() doesn't respect "limited" parameter (patch included)
apc_cache_info is supposed to take two parameters, the second of which is a boolean that suppresses the dump of the cache contents.

Patch:

--- a/modules/quercus/src/com/caucho/quercus/lib/ApcModule.java
+++ b/modules/quercus/src/com/caucho/quercus/lib/ApcModule.java
@@ -75,7 +75,7 @@ public class ApcModule extends AbstractQuercusModule {
   /**
    * Returns cache information.
    */
- public Value apc_cache_info(Env env, @Optional String type)
+ public Value apc_cache_info(Env env, @Optional String type, @Optional("false") boolean limited)
   {
     ArrayValue value = new ArrayValueImpl();
 
@@ -97,7 +97,7 @@ public class ApcModule extends AbstractQuercusModule {
     ArrayValueImpl cacheList = new ArrayValueImpl();
     value.put(env.createString("cache_list"), cacheList);
 
- if ("user".equals(type) && _cache != null) {
+ if ("user".equals(type) && _cache != null && ! limited) {
       ArrayList<String> keys = new ArrayList<String>();
       ArrayList<Entry> values = new ArrayList<Entry>();
 

Notes
(0003313)
ferg   
08-11-08 09:42   
php/4208