eZ Community » Forums » Suggestions » Memcache
expandshrink

Memcache

Memcache

Monday 24 April 2006 3:52:22 pm - 29 replies

It would be great to make code memcache compatible to speed up heavy load sites
More info about memcache

http://www.danga.com/memcached/
http://en.wikipedia.org/wiki/Memcached

Friday 25 August 2006 11:01:30 pm

Xavier,

Could you share your solution for eZ publish on lighttpd, please?

I have a basic setup here on my laptop, but the search is not working.

regards

Saturday 26 August 2006 8:05:52 am

Hi,

Here it comes:

url.rewrite-once = (
"^/.*\.(css|html|htm|pdf|js|ico|png|gif|jpe?g)$" => "$0",
"^/.*?(\?.*)?$" => "/index.php$1"

Saturday 26 August 2006 7:09:31 pm

Thanks for the help!

My search is still not working.. but it is probably something else on my setup. I have included the settings I think are vital (NB: my site is not statically cached yet).

It basically works - the site is running, I can navigate it using urls like
http://localhost/index.php?/blog_site
http://localhost/index.php?/blog_site_admin

Only the search does not work. It generates a link like this:
http://localhost/index.php?SearchText=searchterm&x=8&y=13
which fails with a "Module not found" in eZ publish.

Apparently, the problem is the question mark in the URL - I see from your rewrite rule that you are handling it somehow, but it fails on my setup - any hints?

Gunnstein

server.modules              = (
                                "mod_rewrite",
                                "mod_access",
                                "mod_fastcgi",
                                "mod_simple_vhost",
                                "mod_accesslog" )

server.document-root        = "/srv/www/htdocs/lighttpd/"

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

# Virtual hosts - I don't really know how this works
simple-vhost.server-root   = "/srv/www/htdocs/lighttpd/"
simple-vhost.default-host  = "localhost"
simple-vhost.document-root = "/"

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php",
                                   "max-procs" => 2,
                                   "bin-environment" => (
                                     "PHP_FCGI_CHILDREN" => "16",
                                     "PHP_FCGI_MAX_REQUESTS" => "10000"
                                   ),
                                   "bin-copy-environment" => (
                                     "PATH", "SHELL", "USER"
                                   ),
                                   "broken-scriptfilename" => "enable"
                                 )
                               )
                             )

url.rewrite-once = (
  "^/.*\.(css|html|htm|pdf|js|ico|png|gif|jpe?g)$" => "$0",
  "^/.*?(\?.*)?$" => "/index.php$1"
)

Sunday 27 August 2006 4:07:22 pm

Update: With virtual host (ForceVirtualHost=true in site.ini) it works perfectly.

Tuesday 29 August 2006 12:08:43 pm

Hi Gunnstein,

Do you have an access to creating temporary tables in the database?
Perhaps this is a problem with MySQL configuration.

Regards

Tuesday 29 August 2006 12:25:15 pm

As I said above, it works now, with ForceVirtualHost. I don't think mysql has anything to do with it.
regards

Tuesday 29 August 2006 12:51:38 pm

Sorry, I thought you have still pb with the searching. Forget it, please happy.gif Emoticon

Tuesday 24 June 2008 10:25:58 pm

Any body know how to setup memcached on PHP 5, and sample of of code implementation on custom PHP site.

Wednesday 25 June 2008 8:55:11 am

Api doc is here:
http://php.net/memcache

And there is a link there to examples if the ones on each function isn't complete enough(and their not, so good that it's there happy.gif Emoticon ).

Or many of the hits you get when you search for it on google:
http://www.mysqlperformanceblog.c.../08/09/cache-performance-comparison/

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu