Page 1 of 1
What solution i should use for caching
Posted: Thu Dec 09, 2010 9:44 am
by fabby
Hi all.
I hava a problem with a site. Is veri big, has a lot of requests to the database, and i am forced to use caching.
What should i do? to cache a page, linke on this url: articles.sitepoint.com/article/caching-php-performance/3 or to use some classe, like smart class, or memcache, etc.? What solution is more faster?
Thanks
I will wait your opinion!
Re: What solution i should use for caching
Posted: Thu Dec 09, 2010 12:50 pm
by Darhazer
How big it is? How many requests to the database? Maybe you have bad db design / queries, and not need of cache. Always check your slow query log

As for the caching, use memcached.
Re: What solution i should use for caching
Posted: Thu Dec 16, 2010 4:00 am
by fabby
but what about the solution that i gave as an example? is not faster?
(the site has many queryes, and about 200 mb of data ).
Re: What solution i should use for caching
Posted: Thu Dec 16, 2010 5:03 am
by Darhazer
fabby wrote:but what about the solution that i gave as an example? is not faster?
(the site has many queryes, and about 200 mb of data ).
200 mb of data is pretty small database actually. How many requests?
Did you look at the slow log?
as for the caching, you may cache the entire cache, but since some things are shared it may be more efficient to cache different parts of the page, and when you load the page, to retrieve all of them from the cache.
But... maybe you are still not forced to use cache. We are working on tables with millions of records and 300 queries per second load

So, 200 mb data and few thousand queries for a whole day is not big.
Re: What solution i should use for caching
Posted: Thu Dec 16, 2010 5:30 am
by fabby
But the solution that i gave you as an example is ok?
I tried to use smart cache, but when i am using for categories.php that shows the categoryes, appear problems and the site crashes.
(after i know what solution is better, then i will ask you about optimization...to see what is best for the site)
Re: What solution i should use for caching
Posted: Mon Dec 20, 2010 1:36 am
by fabby
so nobody can help me?

Re: What solution i should use for caching
Posted: Mon Dec 20, 2010 3:06 am
by Darhazer
fabby wrote:so nobody can help me?

Well, you need to help yourself first.