Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-27T13:03:29.180Z
Answers.Text: Thanks Ben. Appreciated.
Answers.UserDisplayName: JMKelley
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-27T08:13:44.263Z
Answers.LastActivityDate: 2021-03-27T08:13:44.263Z
Answers.UserDisplayName: Ben Croker
Body: <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>
  
Tags: <templating><plugin-sprig><plugin-blitz>
Title: Load currentUser using Sprig with Blitz
ThreadText: # 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 %}
              <li class="nav-item position-relative">
                  <a class="nav-link py-3" href="/account" data-toggle="tooltip" data-placement="bottom" title="My Account">
                    <div class="account-circle">
                          <img src="{{ craft.gravatar.url(currentUser.email) }}" width="34" class="rounded-circle"/>
                    </div>
                  </a>
              </li>
              {% else %}
              <li class="nav-item position-relative">
                  <a class="nav-link" href="/account" data-toggle="tooltip" data-placement="bottom" title="My Account">
                    <div class="account-circle">
                          <span class="material-icons" data-icon="account_circle"></span>
                    </div>
                  </a>
              </li>
    {% 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.  
  
  ---
  
  