Fixes #8210 - Adding caching for smart-proxy puppet classes using Stefan Julin's implementation of cache

nm, you make additional asserts on klass. You can use ```#any?``` in the assert below though.