WL-2304 Don’t allow modification from the cache.

We were returning the object directly from the cache which meant that callers could modify the object and then this would be returned to future callers.
Merge pull request #54 from ox-it/WL-2304

WL-2304 Don’t allow modification from the cache.