An attempt to clean up ajax code related to cache

`?` is better :). Changed to what you prefer.