<p>Duplicate of <a href="https://github.com/putyourlightson/craft-sprig/issues/118" rel="nofollow noreferrer">https://github.com/putyourlightson/craft-sprig/issues/118</a></p>
<p>The code is correct and what you are experiencing is likely due to local browser caching.</p>

CC BY-SA 4.0
2021-03-27T13:03:29.180Z
Thanks Ben. Appreciated.
JMKelley
CC BY-SA 4.0
2021-03-27T08:13:44.263Z
2021-03-27T08:13:44.263Z
Ben Croker
<p>I'm having an issue with Sprig + Blitz Caching. I'm trying to load a user image if <code>currentUser</code> exists, though I'm having an issue with the caching. Sprig is loading in the unregistered user photo when logged in. I'm unsure if it's setup right.</p>
<pre><code>      {{ sprig('components/_componentUser', {}, {
        's-trigger': 'refresh, load'
      }) }}
</code></pre>
<p>Then in my <code>_componentUser</code></p>
<pre><code>  {% if currentUser %}
            &lt;li class=&quot;nav-item position-relative&quot;&gt;
                &lt;a class=&quot;nav-link py-3&quot; href=&quot;/account&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;bottom&quot; title=&quot;My Account&quot;&gt;
                  &lt;div class=&quot;account-circle&quot;&gt;
                        &lt;img src=&quot;{{ craft.gravatar.url(currentUser.email) }}&quot; width=&quot;34&quot; class=&quot;rounded-circle&quot;/&gt;
                  &lt;/div&gt;
                &lt;/a&gt;
            &lt;/li&gt;
            {% else %}
            &lt;li class=&quot;nav-item position-relative&quot;&gt;
                &lt;a class=&quot;nav-link&quot; href=&quot;/account&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;bottom&quot; title=&quot;My Account&quot;&gt;
                  &lt;div class=&quot;account-circle&quot;&gt;
                        &lt;span class=&quot;material-icons&quot; data-icon=&quot;account_circle&quot;&gt;&lt;/span&gt;
                  &lt;/div&gt;
                &lt;/a&gt;
            &lt;/li&gt;
  {% endif %}
</code></pre>

<templating><plugin-sprig><plugin-blitz>
Load currentUser using Sprig with Blitz
# Load currentUser using Sprig with Blitz

(Asked by: username_0 on 2021-03-23)

I'm having an issue with Sprig + Blitz Caching. I'm trying to load a user image if currentUser exists, though I'm having an issue with the caching. Sprig is loading in the unregistered user photo when logged in. I'm unsure if it's setup right.
      {{ sprig('components/_componentUser', {}, {
        's-trigger': 'refresh, load'
      }) }}

Then in my _componentUser
  {% if currentUser %}
            
                
                  
                        
                  
                
            
            {% else %}
            
                
                  
                        
                  
                
            
  {% endif %}

**Tags:** templating, plugin-sprig, plugin-blitz


---

## 1 answers

### Answer by username_1 on 2021-03-27. Score: 1 | Accepted answer

Duplicate of <https://github.com/putyourlightson/craft-sprig/issues/118>

The code is correct and what you are experiencing is likely due to local browser caching.

> **Comments:**
> **username_0**: Thanks Ben. Appreciated.  

---

