#37 adding a listeKey() function to the MMCache API


I'm currently looking at mmcache to build an in-memory
object cache (and for php-acceleration of course).
I will need of a php function to liste all the key currently
present in memory, and if possible, the information
related to them (tll, size, ...).

I did look at the code (to find an undocumented
function ;). It don't look so hard, but I don't know how
to add a php function to the code nor how to create an
zend array in the source code.

If somebody add this function, I will create a php page
to browse all the key and their content. I could provide
it to the project if some are interested.


  • Dmitry Stogov

    Dmitry Stogov - 2003-11-03

    Logged In: YES

    This function will a greate security hole for web hosters.
    I have not plans to implement it.

  • Christopher Rousseau

    Logged In: YES

    I understand, and did'nt thing about it. We have our own
    websites here, and totaly agree with you about that security

    I will try to implement it. May I submit the code to you (or
    community) to check it for validity (If I made it)?
    If the code is not so bad, It will maybe interrest
    somebody ? :)
    And how can I submit it as an option ??

  • Dmitry Stogov

    Dmitry Stogov - 2003-11-04

    Logged In: YES

    You can provide a patch that will add some PHP API
    functions. These functions mast be enabled or disabled on
    configure step (using conditional compilation), ant they mast
    be disabled by default.

    If the patch will good I think I will add it.

  • Nobody/Anonymous

    Logged In: NO

    Why don't you combile the "LIST"-Function with
    your multi domain security?

    e.g. list only keys that belong to host "XYZ" by
    prepending internally the string "xyz" to the keys???

    e.g: Domain stogov.com has key HELLO.
    Internally its stored as keyname: stogov.comHELLO

    The list function will only show the keys that
    match the (virtual) host:

    like a

    ls -l "stogov.com*"

  • Michael Alexander Collard, I.

    Logged In: YES

    This would be very handy for me as well.

    Even having this information available in the monitor would be


Log in to post a comment.