Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching MySQL queries

Tags:

php

mysql

caching

Is there a simple way to cache MySQL queries in PHP or failing that, is there a small class set that someone has written and made available that will do it? I can cache a whole page but that won't work as some data changes but some do not, I want to cache the part that does not.

like image 519
Teifion Avatar asked Aug 31 '08 21:08

Teifion


2 Answers

This is a great overview of how to cache queries in MySQL:

  • The MySQL Query Cache
like image 146
GateKiller Avatar answered Oct 04 '22 01:10

GateKiller


You can use Zend Cache to cache results of your queries among other things.

like image 27
Željko Živković Avatar answered Oct 04 '22 01:10

Željko Živković