ts-method-cache icon indicating copy to clipboard operation
ts-method-cache copied to clipboard

Cache per instance instead for whole prototype?

Open denishristov opened this issue 7 years ago • 0 comments

Hello. I have noticed that caching a method like in the example below will cache the returned value for the whole prototype instead of for each instance of the class.

class Example {
  @MemoryCache()
  someMethod() {}
}

Is there a way to cache method calls per instance instead of caching them for the whole prototype?

denishristov avatar Feb 20 '19 15:02 denishristov