Quick PHP caching

I received a question today:

I have some quick caching questions. What is the quickest way to get data into a PHP script? I have some data, I could store it in a database, but I want to avoid that dependency and slow down. I want PHP to compile the file into some data that it can access easily in the script’s name space. Periodically (every 1-2 mins) the system will check the modified time on the file, if it is different, it will reload the data.

The data is not large.

Speaking of caching, what is the best script system for caching these days APC?

Continue reading