Added client-side caching
* public cache() method
* private read_from_cache() and write_to_cache() methods
* requires php 5.0 or greater