Web Hosting Talk







View Full Version : how can i make a cache for mysql and php for example


aakram
10-31-2008, 06:47 AM
how can i make a cache for mysql and php for example

how can i make a cache for mysql and php for example
i have a search engine and lets say someone search for linux and takes the search engine to find linnx 1 second and after like half an hour someone else come and searches for linux i dont want the search engine to go and look for it agean, i want it to give him the resultes from the old search
thanks

cristibighea
10-31-2008, 06:49 AM
This isn't really the correct section to post this, you would probably need to figure out a system that would cache searches and clear them every X hours. Perhaps memcache will also help to make it faster, though I can't really say.





__________________478east
Custom Hosting Solutions
Complex Content Delivery

aakram
10-31-2008, 06:51 AM
i am sure its something with my.ini or the php.ini

barry[CoffeeSprout]
10-31-2008, 09:08 AM
MySQL has a query cache which stores a combination of queries and their results for fast retrieval, but I'm not sure if that works for searches.
Also, caching full text results like this is bound to be expensive.
You're better off optimizing the database and improving your queries so that you don't need to depend on the cache too much.
Query cache info can be found here bte

tulix
10-31-2008, 10:30 AM
You may want to build that functionality in your application - by creating temporary records in the temp table. Kind of create caching by yourself.





__________________
See almost daily specials at http://www.homecom.com
Social networking? File sharing? MS, Flash, 3G streaming? High bandwidth? Help with architecture? Need a reverse proxy? Need a colo?
10 Gb/s lines? Custom hosting? Access to meet me room? Get in touch with us at info@tulix.com

RyanD
10-31-2008, 12:36 PM
You can look into using something ment for caching like memcached.http://www.danga.com/memcached/






__________________
███ - WireSix - Dedicated Servers, Custom Configurations, Colocation - Celebrating 4 years!