cached method

Resource cached()
inherited

Creates a cached resource wrapping this resource.

Implementation

Resource cached() {
  if (this is CachingResource) {
    return this;
  } else {
    return CachingResource(this);
  }
}