There are a lot of options. You can use Memcache, Apc, XCache (windows only), MySQL, a key/value store like MongoDB, Redis, etc, PHP arrays (not as effective as they are gone once the request stops, but within the request they can speed things up), or even flat files.
The most modular thing to do is write a caching mechanism on a higher level, that has "adapters" for different services. Depending on what's available on the server, use a different adapter.
A good example of this is how lithium (li3) does it. See http://lithify.me/docs/lithium/storage/Cache