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

I'd like to lock this too, should I change the `try_lock` to support directories which means a change to `Proxy::HttpDownloads` or write a new `try_lock_dir`?