~hatch/juju-gui/trunk

« back to all changes in this revision

Viewing changes to app/subapps/browser/views/view.js

  • Committer: j.c.sackett
  • Date: 2013-05-29 16:39:15 UTC
  • mfrom: (678.3.22 cache-api-calls)
  • Revision ID: jcsackett@canonical.com-20130529163915-2l855np2i8qc6kz8
Adds caching to interesting/search api calls

* Caching mechanism added to search and editorial on their API calls.
* Editorial can always cache, as it won't change within a user's session.
* Search requires mechanism to see if search has changed, in which case we
need to hit the API again.

R=rharding, matthew.scott
CC=
https://codereview.appspot.com/9828043

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
     *
178
178
     */
179
179
    destructor: function() {
180
 
      this._cacheCharms.destroy();
181
 
 
182
180
      // Clean up any details view we might have hanging around.
183
181
      if (this.details) {
184
182
        this.details.destroy(true);
186
184
    },
187
185
 
188
186
    /**
189
 
     * General YUI initializer.
190
 
     *
191
 
     * @method initializer
192
 
     * @param {Object} cfg configuration object.
193
 
     *
194
 
     */
195
 
    initializer: function(cfg) {
196
 
      // Hold onto charm data so we can pass model instances to other views when
197
 
      // charms are selected.
198
 
      this._cacheCharms = new models.BrowserCharmList();
199
 
    },
200
 
 
201
 
    /**
202
187
     * Check if this view is the fullscreen version to help aid us in
203
188
     * template work.
204
189
     *