Answers.Body: <p><code>appId</code> wont help you there. If you take a look at the <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/etc/config/defaults/general.php#L55" rel="nofollow">source code</a>, you'll see how the <code>appId</code> is used in sessions.</p>
  
  <p>I'm not aware of an automatic way to prepend cache keys.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-20T14:04:14.637Z
Answers.LastActivityDate: 2015-04-20T17:17:32.947Z
Answers.LastEditDate: 2015-04-20T17:17:32.947Z
Answers.UserDisplayName: Aaron Berkowitz
Body: <p>I want to ensure that cache is set per domain at a config level. So rather than saying something like this in the template:</p>
  
  <pre><code>{% cache using key craft.config.getHostInfo ~ '.' ~ entry.slug ~ '.masterPrimaryNav' %}
      foo
  {% endcache %}
  </code></pre>
  
  <p>I would like to set this in config so the cache key is prepended automatically. I had hoped that the general appId would help this on config, but I can't see that being set in the cache key when I set it: <a href="http://buildwithcraft.com/docs/config-settings#appId" rel="nofollow">http://buildwithcraft.com/docs/config-settings#appId</a></p>
  
  <p>Is there a way to do this?</p>
  
Tags: <config><cache>
Title: How is appID used in caching?
ThreadText: # How is appID used in caching?
  
  (Asked by: username_0 on 2015-04-20)
  
  I want to ensure that cache is set per domain at a config level. So rather than saying something like this in the template:
  
  ```
  {% cache using key craft.config.getHostInfo ~ '.' ~ entry.slug ~ '.masterPrimaryNav' %}
      foo
  {% endcache %}
  
  ```
  
  I would like to set this in config so the cache key is prepended automatically. I had hoped that the general appId would help this on config, but I can't see that being set in the cache key when I set it: <http://buildwithcraft.com/docs/config-settings#appId>
  
  Is there a way to do this?
  
  **Tags:** config, cache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-20. Score: 1
  
  `appId` wont help you there. If you take a look at the [source code](https://github.com/pixelandtonic/Craft-Release/blob/master/app/etc/config/defaults/general.php#L55), you'll see how the `appId` is used in sessions.
  
  I'm not aware of an automatic way to prepend cache keys.
  
  
  ---
  
  