suggestion: cross host caching

Xuefer
2003-09-28
2003-09-30
  • Xuefer
    Xuefer
    2003-09-28

    for
    mmcache_set()
    mmcache_get()
    i'd suggest mmcache add a "namespace"
    which can config for per-vhost

    # by servername
    php_admin_value mmcache.namespace ""
    # by string
    php_admin_value mmcache.namespace "myserver"

     
    • Dmitry Stogov
      Dmitry Stogov
      2003-09-29

      You are right about the possiblity of modification of $_SERVER['SERVER_NAME'], but I don't like to introduce namespaces. What do you think about the following decision. $_SERVER['SERVER_NAME'] will be stored inside mmcache on start of each request so modification of it will not get effect on mmcache_get/mmcache_put.

       
    • Xuefer
      Xuefer
      2003-09-29

      hehe, you got the right way to fix the security problem, thanks
      but this suggestion is not against that problem
      it just implement another feature :)
      just to cross host caching contents/sessions, (e.g.: cross domain session)
      suppose i have www.example.com and i have www.example.net, abc.example.com def.example.com etc...

      if no namespace is implement, vhosts cache contents/sessions in vary SERVER_NAMEs
      which make duplicate caches, and can't cross domain session

       
      • Dmitry Stogov
        Dmitry Stogov
        2003-09-30

        How you implement crossdomain sessions?
        Are crossdomain cookies possible?

        I have made cache separation only for security reason.

        I will think about caching namespaces, but with very low priority. I have some more significant BUGs.

        Please, make a "feature request" for this problem.

         
        • Xuefer
          Xuefer
          2003-09-30

          thanks, i just find "feature request" tracker recently
          moving to there

           
    • Xuefer
      Xuefer
      2003-09-29

      forgot to say, the first example of mime is not enough to explain what i want

      # "" means "vary by servername"
      # this is default value, need not to set here
      # php_admin_value mmcache.namespace ""

      <VirtualHost 127.0.0.7>
      ServerName www.example.net
      # by string
      php_admin_value mmcache.namespace "ns:example"
      DocumentRoot ....
      </VirtualHost>

      <VirtualHost 127.0.0.7>
      ServerName www.example.com
      # by string
      php_admin_value mmcache.namespace "ns:example"
      DocumentRoot ....
      </VirtualHost>

      <VirtualHost 127.0.0.7>
      ServerName abc.example.com
      # by string
      php_admin_value mmcache.namespace "ns:example"
      DocumentRoot ....
      </VirtualHost>

      <VirtualHost 127.0.0.7>
      ServerName www.anotherhost.com
      DocumentRoot ....
      # this vhost will use default namespace, (vary by SERVER_NAME)
      </VirtualHost>