Caching is an external entity in PHP, since its not sharing anything between processes.
You can create a disk based caching mechanism by dropping data into writable directory and based on some rules (timestamp etc.) you can fetch the data instead of running the code logic if valid, or generate new data if invalid, for consequent requests.
PHP extensions and backends are available to provide caching mechanism, popular ones are APC, WinCache (Windows only), Memcache/MemcacheD, Zend Data Cache and more.
There is also an option to cache in database with fast connection, if you have an app which requires the DB constantly, but it would be less performant than caching extensions and backends.
Zend Support Team