Switched to use the cache instead of the context