Skip to content

Commit 3c51476

Browse files
authored
Update @cached decorator documentation link (#2177)
Updated the link for the @cached decorator to the official Ember API documentation and removed outdated information about the ember-cached-decorator-polyfill.
1 parent 794b3a5 commit 3c51476

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

guides/release/in-depth-topics/autotracking-in-depth.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ getter is very expensive, however, you will want to cache the value and
403403
retrieve it when the dependencies haven't changed. You want to recompute only
404404
if a dependency has been updated.
405405

406-
Ember's [@cached decorator](https://github.com/ember-polyfills/ember-cache-primitive-polyfill) lets
406+
Ember's [@cached decorator](https://api.emberjs.com/ember/6.8/functions/@glimmer%2Ftracking/cached) lets
407407
you cache (or "memoize") a getter by simply marking it as `@cached`.
408408

409409
With this in mind, let's introduce caching to `aspectRatio`:
@@ -445,6 +445,4 @@ only twice.
445445

446446
In general, you should avoid using @cached unless you have confirmed that the getter you are decorating is computationally expensive, since @cached adds a small amount of overhead to the getter.
447447

448-
The @cached decorator was released in Ember 4.1. If you want to leverage this API between versions 3.13 and 4.1, you can install [ember-cached-decorator-polyfill](https://github.com/ember-polyfills/ember-cached-decorator-polyfill) to your project.
449-
450448
<!-- eof - needed for pages that end in a code block -->

0 commit comments

Comments
 (0)