Skip to content

Commit

Permalink
feat(cache): remove cache operator
Browse files Browse the repository at this point in the history
Because of all of the confusion around the `cache` operator, this removes the operator
from RxJS head of the 5.0.0 release. This is done for a few reasons\:

1. The name `cache` implies it supports all sorts of caching strategies, when this is pretty limited
2. Behavior around unending and hot observables is hard to reason about
3. Once we have a properly designed `cache` operator we can add it at a later time and it will not be a breaking change
  • Loading branch information
benlesh authored and jayphelps committed Oct 7, 2016
1 parent e800964 commit 1b23ace
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 297 deletions.
222 changes: 0 additions & 222 deletions spec/operators/cache-spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/Rx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import './add/operator/bufferCount';
import './add/operator/bufferTime';
import './add/operator/bufferToggle';
import './add/operator/bufferWhen';
import './add/operator/cache';
import './add/operator/catch';
import './add/operator/combineAll';
import './add/operator/combineLatest';
Expand Down
11 changes: 0 additions & 11 deletions src/add/operator/cache.ts

This file was deleted.

63 changes: 0 additions & 63 deletions src/operator/cache.ts

This file was deleted.

2 comments on commit 1b23ace

@webbiscuit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the upgrade path from people who have cache() already in their source code, is to replace cache with .publishReplay().refCount()?

@MoonStorm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really @webbiscuit . It's not the same thing in so many ways.

Please sign in to comment.