 <p>Maybe a possibility for you is to cache your data as real PHP. The function <a href="http://php.net/var_export" rel="nofollow"><code>var_export</code></a> provides you with the PHP representation of data. It has some limitation, which <a href="http://php.net/serialize" rel="nofollow"><code>serialize</code></a> does not have when it comes to circular references, but on the other hand it is way easier to understand, because you already know the syntax.</p>