Caching data in PHP

I’m developing a site in PHP which has some complex SQL queries and I would like to implement a caching feature to reduce the load on the database.

I’m just wondering would it be better to write …