Fix bug where cache values were being stored incorrectly.

When the cache value was set when the JSON is changed, wgMemcKey
was being called twice and causing the value to be stored in the
wrong place.

Change-Id: I46fbb46357fd8e1a64d8d11cd0f897dfa4f014f8