Fork me on GitHub

Shared memory caching.  Bottom

  • Currently I am using a shared memory caching scheme on my site. http://www.adamstevenson.net/mycached.phps
    All I had to add to the top of index.php right below pnInit() was

    if(!pnUserLoggedIn()){
    include 'mycached.php';
    do_cache();
    }

    Does this seem like a good solution? I can serve many many times the number of pages a second now on my little webserver. Any problems anyone can see offhand?
  • I don't see any functional problems, it looks like it will work very well. I don't know your intent with this script, PN already has a disc caching system that can work for everybody, so in there may lay a problem, adoption. Don't mean to be so negative, but your script exludes usage for a paticular group of people, anyone that uses PHP as a cgi or cli agent. For that I don't see a shared memory caching scheme making it into the main development branch anytime soon. Good job though.
  • You are right, only people that have the shared memory compiled version can use it, but it might be worth it for high traffic sites. The caching works faster than disk caching. I agree, I don't think it will make it into the main branch anytime soon, but might be useful for some situations.

This list is based on users active over the last 60 minutes.