Cache.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">A simple caching classe, used internaly by [page:XHRLoader].</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]()</h3>
  15. <div>
  16. Creates a new [name].
  17. </div>
  18. <h2>Properties</h2>
  19. <h3>[property:Boolean enabled]</h3>
  20. <div>
  21. Whether caching is enabled. Default is *false*.
  22. </div>
  23. <h3>[property:Object files]</h3>
  24. <div>
  25. An [page:Object object] that hold cached values.
  26. </div>
  27. <h2>Methods</h2>
  28. <h3>[method:null add]( [page:String key], value )</h3>
  29. <div>
  30. [page:String key] — required. A string key <br />
  31. [page:Object] value — A value <br />
  32. </div>
  33. <div>
  34. Adds a cache entry with that key to hold the value. If this key already holds a value, it is overwritten.
  35. </div>
  36. <h3>[method:null get]( [page:String key] )</h3>
  37. <div>
  38. [page:String key] — required. A string key <br />
  39. </div>
  40. <div>
  41. Get the value of key. If the key does not exist *undefined* is returned.
  42. </div>
  43. <h3>[method:null remove]( [page:String key] )</h3>
  44. <div>
  45. [page:String key] — required. A string key <br />
  46. </div>
  47. <div>
  48. Remove the cached value associated with the key.
  49. </div>
  50. <h3>[method:null clear]()</h3>
  51. <div>
  52. Remove all values from the cache.
  53. </div>
  54. <h2>Source</h2>
  55. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  56. </body>
  57. </html>