cached method

Resource cached()

Creates a cached resource wrapping this resource.

Implementation

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