# Cache.evict and useQuery (SSR)

**URL:** <https://community.apollographql.com/t/cache-evict-and-usequery-ssr/1006>\
**Category:** Client SDKs\
**Tags:** client, web\
**Created:** [August 6, 2021, 12:27pm UTC](https://community.apollographql.com/t/cache-evict-and-usequery-ssr/1006 "2021-08-06T12:27:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kheang\_Hok\_Chin](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/kheang_hok_chin/32/391_2.png) [@Kheang\_Hok\_Chin](https://community.apollographql.com/u/Kheang_Hok_Chin)\
**Post date:** [August 6, 2021, 12:27pm UTC](https://community.apollographql.com/t/cache-evict-and-usequery-ssr/1006/1 "2021-08-06T12:27:53Z")

</div>

Hi,

In my project I am using `cache.evict` to force queries to re-execute in my components.  
An issue that I am seeing is on initial refresh/mount, SSR queries don’t seem to be re-executed when `cache.evict` is called.

Is there a way around this?

In my scenario I have the same query executed in 2 components on the same page, one is loaded on the client side and another is pre-loaded using SSR.

The pre-loaded one never updates unless I navigate away and back to my page (so its executed on the client).

I am using @apollo/client@3.4.5.

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![Kheang\_Hok\_Chin](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/kheang_hok_chin/32/391_2.png) [@Kheang\_Hok\_Chin](https://community.apollographql.com/u/Kheang_Hok_Chin)\
**Post date:** [August 11, 2021, 7:19pm UTC](https://community.apollographql.com/t/cache-evict-and-usequery-ssr/1006/2 "2021-08-11T19:19:38Z")

</div>

I just noticed that I had an issue with my login/logout code, when I call `resetStore` it would no longer re-execute my queries in order to refresh my page to show that I am logged-in or not.

So I tried the following, I uninstalled `@apollo/client` and reinstalled the oldest version I had before the recent updates, which was 3.3.21 and now my login/logout and even the useQuery code works again.

So something or some code changed and broke these functionalities in my app, not sure what though.

I will try to update version by version to see in what update it broke.

**UPDATE**

It seems to work up until 3.4.2, when I update to 3.4.3+ it no longer works at all.  
So something definitely changed in the code due to the update.
