title: How to use require({cache:{ in dojo layers?
body: <p>After reading <a href="/questions/tagged/dojo-build" class="post-tag" title="show questions tagged 'dojo-build'" rel="tag">dojo-build</a> tag I've found out many problems that people have with customizing the builds, so I've thought of creating the build myself instead. But I wasn't able to find a reference for syntax used while constructing Dojo AMD layers, namely:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>require({cache:{"custom/MyModule":function () {
      define(["dojo/_base/lang"], function (lang) {
  </code></pre>
  
  <p>It looks like cache is a map where the module name is key, and the value is function which body is my module file content.</p>
  
  <p>But I don't fully understand the lower part:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>}, "*now":function (r) {
      r(["dojo/i18n!*preload*custom/nls/all*[\"en\",\"de\",\"ROOT\"]"]);
  }}});
  </code></pre>
  
  <p>This "*now" is also a key, but it seems to have special interprenation. Do I need it in my module? Or it is optional?</p>
  
  <pre class="lang-javascript prettyprint-override"><code>define("custom/all", [], 1);
  </code></pre>
  
  <p>is the last part. As I suppose, it is obligatory to do this define, even if layer module won't be directly referenced anywhere?</p>