Fixes gh-82

An advice people. Don't use json_encode/_decode on a hash array which contains hash arrays of objects. json_decode can create hash arrays or objects, not both.

Another advice. Don't use JRegistry, especially with the PHP format, if you want to store something complicated. Unfortunately you have no other option if you want to go through the database and you value security.

In so many words: write your own bloody cache handler and don't do what I had to do over here.