old_contents: module.exports = function (Vue) {
  
      Vue.http.interceptors.unshift({
  
              request: function (request) {
  
                  if (request.cache !== undefined && /^(GET|JSONP)$/i.test(request.method)) {
  
                      var hit = Vue.cache.get(request.url);
  
                      if (hit) {
                          delete request.cache;
                          request.client = function () {
                              return hit;
                          };
                      }
                  }
  
                  return request;
              },
  
              response: function (response) {
  
                  if (response.request.cache !== undefined && response.ok) {
                      Vue.cache.set(response.request.url, response, response.request.cache);
                  }
  
                  return response;
              }
  
          }
      );
  
  };
  
new_contents: module.exports = function (Vue) {
  
      Vue.http.interceptors.unshift(function () {
  
              var hit, key, lifetime;
  
              return {
                  request: function (request) {
  
                      if (request.cache !== undefined && /^(GET|JSONP)$/i.test(request.method)) {
  
                          if (_.isObject(request.cache)) {
                              lifetime = request.cache.lifetime;
                              key = '_resource.' + request.cache.key;
                          } else {
                              lifetime = request.cache;
                              key = request.url;
                          }
  
                          hit = Vue.cache.get(key);
                          if (hit) {
                              request.client = function () {
                                  return hit;
                              };
                          }
                      }
  
                      return request;
                  },
  
                  response: function (response) {
  
                      if (!hit && response.ok) {
                          Vue.cache.set(key, response, lifetime);
                      }
  
                      return response;
                  }
              };
  
          }
      );
  
  };
  
subject: update cache interceptor