Sometimes a script needs to call a function that either uses a large amount of system resources, or that performs external calls to servers or APIs that place limits on requests. Often, however, the data returned by these functions isn’t highly volatile, and can be expected to remain the same for subsequent calls.
In these cases, it is necessary to implement a form of cache, to store the results of running the function once, and use the same results on subsequent calls (clearing the cache regularly, to prevent buildup).
Caching to disk is fairly easy to implement in PHP, but it is nice to have a prebuilt, general purpose solution that can be dropped in to any project.
read more »